Pārlūkot izejas kodu

修改仓库确认入库、确认出库查询条件,完善车队重去重回问题,添加car数据表 加corpId字段

阿伏兔 4 gadi atpakaļ
vecāks
revīzija
b87b9046f3

+ 2 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TContainerPortController.java

@@ -91,7 +91,7 @@ public class TContainerPortController extends BaseController {
      * @return
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:containerPort:add')")
-    @PostMapping("/revokeContainerPort/{fId}")
+    @GetMapping("/revokeContainerPort/{fId}")
     @RepeatSubmit
     public AjaxResult revokeContainerPort (@PathVariable("fId") Long fId) {
         if (StringUtils.isNull(fId)) {
@@ -107,7 +107,7 @@ public class TContainerPortController extends BaseController {
      * @return
      */
     @PreAuthorize("@ss.hasPermi('warehouseBusiness:containerPort:remove')")
-    @PostMapping("/removeContainerPort/{fId}")
+    @GetMapping("/removeContainerPort/{fId}")
     @RepeatSubmit
     public AjaxResult removeContainerPort (@PathVariable("fId") Long fId) {
         if (StringUtils.isNull(fId)) {

+ 12 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbillscars.java

@@ -37,6 +37,10 @@ public class Ftmsorderbillscars extends BaseEntity {
     @Excel(name = "集装箱类型id,主表")
     private Long cntrId;
 
+    /** 客户,主表 */
+    @Excel(name = "客户id,主表")
+    private Long corpId;
+
     /** 集装箱号 */
     @Excel(name = "集装箱号")
     private String cntrNo;
@@ -554,6 +558,14 @@ public class Ftmsorderbillscars extends BaseEntity {
         this.acceptRemarks = acceptRemarks;
     }
 
+    public Long getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(Long corpId) {
+        this.corpId = corpId;
+    }
+
     public Date getLoadDate() {
         return loadDate;
     }

+ 2 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java

@@ -627,6 +627,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
                     }
                     s.setOrgId(pId);
                     s.setCreateTime(new Date());
+                    s.setCorpId(tmsorderbills.getCorpId());
                     s.setCreateBy(loginUser.getUsername());
                     if (ftmsorderbillscarsMapper.insertftmsorderbillscars(s) <= 0) {
                         TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -669,6 +670,7 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
                 }
                 s.setCreateTime(new Date());
                 s.setMblno(tmsorderbills.getMblno());
+                s.setCorpId(tmsorderbills.getCorpId());
                 s.setCreateBy(loginUser.getUsername());
                 if (ftmsorderbillscarsMapper.insertftmsorderbillscars(s) <= 0) {
                     TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();

+ 6 - 1
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -10,6 +10,7 @@
         <result property="orgId" column="org_id"/>
         <result property="orderNo" column="order_no"/>
         <result property="cntrId" column="cntr_id"/>
+        <result property="corpId" column="corp_id"/>
         <result property="cntrNo" column="cntr_no"/>
         <result property="carcorPid" column="carcor_pid"/>
         <result property="mblno" column="mblno"/>
@@ -109,7 +110,7 @@
     </resultMap>
 
     <sql id="selectftmsorderbillscarsVo">
-        select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_user_id,
+        select id, p_id, org_id, order_no, cntr_id, corp_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_user_id,
          driver_tel, plan_date, plan_remarks, accept_date, accept_remarks, load_date, load_remarks, md_load_date, off_data,
           off_remarks, md_load_remarks, un_load_date, un_load_remarks, waybill_date, qty_load, qty_un_load, cntr_qty,
            gopods_loss_qty, cntr_weight, gopods_lossrate, waybill_remarks, gopods_lossamt_cr, qty_dr, gopods_lossamt_dr,
@@ -130,6 +131,7 @@
             <if test="orgId != null "> and org_id = #{orgId}</if>
             <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="cntrId != null "> and cntr_id = #{cntrId}</if>
+            <if test="corpId != null "> and corp_id = #{corpId}</if>
             <if test="cntrNo != null  and cntrNo != ''"> and cntr_no = #{cntrNo}</if>
             <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
             <if test="mblno != null  and mblno != ''"> and mblno = #{mblno}</if>
@@ -809,6 +811,7 @@
             <if test="orgId != null">org_id,</if>
             <if test="orderNo != null">order_no,</if>
             <if test="cntrId != null">cntr_id,</if>
+            <if test="corpId != null">corp_id,</if>
             <if test="cntrNo != null">cntr_no,</if>
             <if test="carcorPid != null">carcor_pid,</if>
             <if test="mblno != null">mblno,</if>
@@ -911,6 +914,7 @@
             <if test="orgId != null">#{orgId},</if>
             <if test="orderNo != null">#{orderNo},</if>
             <if test="cntrId != null">#{cntrId},</if>
+            <if test="corpId != null">#{corpId},</if>
             <if test="cntrNo != null">#{cntrNo},</if>
             <if test="carcorPid != null">#{carcorPid},</if>
             <if test="mblno != null">#{mblno},</if>
@@ -1017,6 +1021,7 @@
             <if test="orgId != null">org_id = #{orgId},</if>
             <if test="orderNo != null">order_no = #{orderNo},</if>
             <if test="cntrId != null">cntr_id = #{cntrId},</if>
+            <if test="corpId != null">corp_id = #{corpId},</if>
             <if test="cntrNo != null">cntr_no = #{cntrNo},</if>
             <if test="carcorPid != null">carcor_pid = #{carcorPid},</if>
             <if test="mblno != null">mblno = #{mblno},</if>

+ 7 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TFeesMapper.java

@@ -80,4 +80,11 @@ public interface TFeesMapper {
      * @return  结果
      */
     String selectTFeesModify(TFees tFees);
+
+    /**
+     *  根据费用名查询数据
+     * @param fName
+     * @return
+     */
+    public TFees selectTFeesByFName(String fName);
 }

+ 31 - 5
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -49,6 +49,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
 import java.math.BigDecimal;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -362,8 +363,18 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         } else {
             tWhgenleg.setfMblno(warehouseBills.getfMblno());
         }
+        // 业务类型
+        tWhgenleg.setfBusinessType(warehousebillsitems.getfBusinessType());
+        // 业务类型详情
+        tWhgenleg.setfMarks(warehousebillsitems.getfMarks());
         // 原始入库日期
-        tWhgenleg.setfOriginalbilldate(warehousebillsitems.getfOriginalbilldate());
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        String time = sdf.format(warehousebillsitems.getfOriginalbilldate());
+        try {
+            tWhgenleg.setfOriginalbilldate(sdf.parse(time));
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
         // 箱号
         if (StringUtils.isNotEmpty(warehousebillsitems.getfBoxno())) {
             tWhgenleg.setfCntrno(warehousebillsitems.getfBoxno());
@@ -1379,12 +1390,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         TWarehouseBills warehouseBills = JSONArray.parseObject(tWarehouseBills, TWarehouseBills.class);
         warehouseBills.setfBilltype("CKJG");
         // 判断提单号是否存在
-        if (tWarehouseBillsMapper.selectContainMblno(warehouseBills) > 0 && StringUtils.isNull(warehouseBills)) {
+        if (StringUtils.isNull(warehouseBills.getfId()) && tWarehouseBillsMapper.selectContainMblno(warehouseBills) > 0) {
             return AjaxResult.error("该提单号已存在");
         }
         Long billStatus = 2L;
         if ("add".equals(type)) {
             billStatus = 6L;
+            warehouseBills.setfReviewDate(warehouseBills.getfBsdate());
             warehouseBills.setfBillstatus(billStatus);
         } else {
             if (StringUtils.isNull(warehouseBills.getfBillstatus())) {
@@ -1412,6 +1424,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                     return AjaxResult.error("付款费用第" + line + "行,缺少必填信息");
                 }
+                cr.setfDc("C");
                 cr.setfBillstatus(billStatus);
                 cr.setCreateTime(new Date());
                 cr.setfPid(warehouseBills.getfId());
@@ -1429,6 +1442,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                     return AjaxResult.error("收款费用第" + line + "行,缺少必填信息");
                 }
+                dr.setfDc("D");
                 dr.setfBillstatus(billStatus);
                 dr.setCreateTime(new Date());
                 dr.setfPid(warehouseBills.getfId());
@@ -1449,18 +1463,30 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     public AjaxResult selectBasicInformation() {
         Map<String, Object> map = new HashMap<>();
         TCorps corps = new TCorps();
-        corps.setfTypeid("\"1\"");
+        String typeValue = "[\"1\"]";
+        corps.setfTypeid(typeValue);
         corps.setfStatus("0");
         // 应收 取客户
         map.put("corpList", tCorpsMapper.selectTCorpsListLimit200(corps));
         // 应付 取陆运公司
-        corps.setfTypeid("\"2\"");
-        map.put("transportationList", tCorpsMapper.selectTCorpsListLimit200(corps));
+        TCorps transportation = new TCorps();
+        typeValue = "[\"2\"]";
+        transportation.setfTypeid(typeValue);
+        transportation.setfStatus("0");
+        map.put("transportationList", tCorpsMapper.selectTCorpsListLimit200(transportation));
         // 查询箱信息
         TCntr tCntr = new TCntr();
         tCntr.setfStatus("T");
         map.put("cntrList", tCntrMapper.selectRcntrName(tCntr));
         map.put("pierList", sysDictDataMapper.selectDictDataByType("pier"));
+        TFees tFees = tFeesMapper.selectTFeesByFName("集港费");
+        if (StringUtils.isNull(tFees)) {
+            map.put("fees", tFees);
+            return AjaxResult.success("未找到集港费用信息,请添加", map);
+        }
+        List<TFees> feesList = new ArrayList<>();
+        feesList.add(tFees);
+        map.put("fees", feesList);
         return AjaxResult.success(map);
     }
 

+ 3 - 0
ruoyi-warehouse/src/main/resources/mapper/basicData/TFeesMapper.xml

@@ -125,5 +125,8 @@
     <select id="checkUFNnameUnique" parameterType="String" resultMap="TFeesResult">
         select f_id,f_name from t_fees where f_name = #{fAame} limit 1
     </select>
+    <select id="selectTFeesByFName" parameterType="string" resultMap="TFeesResult">
+        select f_id,f_name from t_fees where f_name = #{fAame}
+    </select>
 
 </mapper>

+ 2 - 0
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -89,6 +89,8 @@
             <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
             <if test="fMblno != null ">and f_mblno = #{fMblno}</if>
             <if test="fCntrno != null ">and f_cntrno = #{fCntrno}</if>
+            <if test="fBusinessType != null ">and f_business_type = #{fBusinessType}</if>
+            <if test="fMarks != null ">and f_marks = #{fMarks}</if>
             <if test="fOriginalbilldate != null ">and f_originalbilldate = #{fOriginalbilldate}</if>
             <if test="fWarehouseLocationid != null ">and f_warehouse_locationid = #{fWarehouseLocationid}</if>
             <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>