Преглед на файлове

客户只查所填申报单,统计调整

lzm преди 3 години
родител
ревизия
17c5cdd9a6

+ 0 - 1
sp-server/app.pid

@@ -1 +0,0 @@
-15424

+ 8 - 0
sp-server/src/main/java/com/pj/api/service/ApiService.java

@@ -144,6 +144,10 @@ public class ApiService {
     }
 
     public void addDeclare(TbDeclare tbDeclare) {
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if(!StrUtil.isEmpty(currentCustomerId)){
+            tbDeclare.setCustomerId(currentCustomerId);
+        }
         String chinaCarNo = tbDeclare.getChinaCarNo();
         if (StrUtil.isNotEmpty(chinaCarNo)) {
             chinaCarNo = chinaCarNo.toUpperCase();
@@ -161,6 +165,10 @@ public class ApiService {
     }
 
     public void addDisinfect(TbDisinfect tbDisinfect) {
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if(!StrUtil.isEmpty(currentCustomerId)){
+            tbDisinfect.setCustomerId(currentCustomerId);
+        }
         String nowStr = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
         tbDisinfect.setCode(nowStr + RandomUtil.randomNumbers(6)).setApplyTime(DateUtil.now());
         tbDisinfectService.save(tbDisinfect);

+ 5 - 0
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareController.java

@@ -2,6 +2,7 @@ package com.pj.project.tb_declare;
 
 import java.util.List;
 
+import com.pj.constants.UserTypeEnum;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -72,6 +73,10 @@ public class TbDeclareController {
 	@RequestMapping("getList")
 	public AjaxJson getList() { 
 		SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId", currentCustomerId);
+        }
 		List<TbDeclare> list = tbDeclareService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_declare/TbDeclareMapper.xml

@@ -97,6 +97,7 @@
         <where>
             <if test=' this.has("id") '>and id = #{id}</if>
             <if test=' this.has("businessId") '>and business_id = #{businessId}</if>
+            <if test=' this.has("customerId") '>and customer_id = #{customerId}</if>
             <if test=' this.has("declarePeople") '>and declare_people like concat('%',#{declarePeople},'%')</if>
             <if test=' this.has("goodsName") '>and goods_name = #{goodsName}</if>
             <if test=' this.has("grossWeight") '>and gross_weight = #{grossWeight}</if>

+ 5 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfectController.java

@@ -2,6 +2,7 @@ package com.pj.project.tb_disinfect;
 
 import java.util.List;
 
+import com.pj.constants.UserTypeEnum;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -72,6 +73,10 @@ public class TbDisinfectController {
 	@RequestMapping("getList")
 	public AjaxJson getList() { 
 		SoMap so = SoMap.getRequestSoMap();
+        String currentCustomerId = StpUserUtil.getCustomerId();
+        if (!currentCustomerId.equals(UserTypeEnum.PLATFORM_ADMIN.getCustomerId())) {
+            so.put("customerId", currentCustomerId);
+        }
 		List<TbDisinfect> list = tbDisinfectService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}

+ 1 - 0
sp-server/src/main/java/com/pj/project/tb_disinfect/TbDisinfectMapper.xml

@@ -47,6 +47,7 @@
 		<include refid="select_sql"></include>
 		<where>
 			<if test=' this.has("id") '> and id = #{id} </if>
+            <if test=' this.has("customerId") '>and customer_id = #{customerId}</if>
 			<if test=' this.has("sendPeople") '> and send_people = #{sendPeople} </if>
 			<if test=' this.has("receivePeople") '> and receive_people = #{receivePeople} </if>
 			<if test=' this.has("goodsName") '> and goods_name = #{goodsName} </if>

+ 2 - 1
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetails.java

@@ -109,7 +109,8 @@ public class TbFeeDetails implements Serializable {
         STEVEDORE_FEE(3,"装卸作业"),
         PARK_FEE(4,"停车费"),
         WEIGHT_FEE(5,"过磅费"),
-        MANAGE_FEE(6, "入场管理费");
+        MANAGE_FEE(6, "入场管理费"),
+        CHARGE_FEE(7, "充电打冷作业");
         private int code;
         private String desc;
     }

+ 3 - 1
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsService.java

@@ -115,10 +115,12 @@ public class TbFeeDetailsService extends ServiceImpl<TbFeeDetailsMapper, TbFeeDe
                 feeType = TbFeeDetails.fee.DISINFECT_FEE.getCode();
             } else if(itemType.contains("装卸")){
                 feeType = TbFeeDetails.fee.STEVEDORE_FEE.getCode();
-            } else if(StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "充电打冷") || StrUtil.equals(itemType, "汽车吊" )){
+            } else if(StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "汽车吊" )){
                 feeType = TbFeeDetails.fee.STEVEDORE_FEE.getCode();
             } else if(itemType.contains("入场管理")){
                 feeType = TbFeeDetails.fee.MANAGE_FEE.getCode();
+            } else if(StrUtil.equals(itemType, "充电打冷")) {
+                feeType = TbFeeDetails.fee.CHARGE_FEE.getCode();
             }
             TbBusiness business = tbBusinessService.getById(item.getBusinessId());
             TbFeeDetails businessFee = getByBusinessIdAndCarNoAndItemType(item.getBusinessId(), business.getCardNo(), item.getItemTypeId());

+ 2 - 1
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatistics.java

@@ -116,7 +116,8 @@ public class TbFeeStatistics implements Serializable {
         STEVEDORE_FEE(3,"装卸作业"),
         PARK_FEE(4,"停车费"),
         WEIGHT_FEE(5,"过磅费"),
-        MANAGE_FEE(6, "入场管理费");
+        MANAGE_FEE(6, "入场管理费"),
+        CHARGE_FEE(7, "充电打冷作业");
         private int code;
         private String desc;
     }

+ 3 - 1
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java

@@ -145,10 +145,12 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
                 feeType = TbFeeStatistics.feeType.DISINFECT_FEE.getCode();
             } else if (itemType.contains("装卸")) {
                 feeType = TbFeeStatistics.feeType.STEVEDORE_FEE.getCode();
-            } else if (StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "充电打冷") || StrUtil.equals(itemType, "汽车吊")) {
+            } else if (StrUtil.equals(itemType, "特殊车辆") || StrUtil.equals(itemType, "汽车吊")) {
                 feeType = TbFeeStatistics.feeType.STEVEDORE_FEE.getCode();
             } else if (itemType.contains("入场管理")) {
                 feeType = TbFeeStatistics.feeType.MANAGE_FEE.getCode();
+            } else if(StrUtil.equals(itemType, "充电打冷")) {
+                feeType = TbFeeStatistics.feeType.CHARGE_FEE.getCode();
             }
             TbFeeStatistics businessFee = this.getByDayAndFeeType(toDay, feeType);
             if (businessFee == null) {