Procházet zdrojové kódy

应收应付导入 添加删除接口 修改bug

785834757 před 2 roky
rodič
revize
c711113e41

+ 7 - 0
src/main/java/com/ydtech/modules/inv/controller/InvReceivableController.java

@@ -142,6 +142,13 @@ public class InvReceivableController extends BaseController {
         return HttpResult.ok(uploadUrl + "excel/" +fileName);
     }
 
+    @ApiOperation("结算导入删除")
+    @PostMapping("deleteSettlement")
+    public HttpResult deleteSettlement(@RequestBody String[] ids){
+        Boolean b = invReceivableService.deleteSettlement(ids);
+        return b ? HttpResult.ok("删除成功") : HttpResult.error("删除失败");
+    }
+
 
     @ApiOperation("应收结果")
     @GetMapping("receivableResult")

+ 2 - 0
src/main/java/com/ydtech/modules/inv/service/InvReceivableService.java

@@ -59,4 +59,6 @@ public interface InvReceivableService {
     Boolean addReceivable(InvSource invSource);
 
     List<String> dataMatching();
+
+    Boolean deleteSettlement(String[] ids);
 }

+ 7 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java

@@ -660,6 +660,13 @@ public class InvReceivableServiceImpl implements InvReceivableService {
         return data;
     }
 
+    @Override
+    public Boolean deleteSettlement(String[] ids) {
+        List<String> list = Arrays.asList(ids);
+        int i = invSettlementSourceMapper.deleteBatchIds(list);
+        return i>0?true:false;
+    }
+
 }
 
 

+ 6 - 6
src/main/resources/mapper/modules/inv/InvSourceMapper.xml

@@ -136,22 +136,22 @@
             and a.licenseno = #{param.licenseno}
         </if>
         <if test="param.jqPolicyId != null and param.jqPolicyId != ''">
-            and a.jq_policy_id = #{jqPolicyId}
+            and a.jq_policy_id = #{param.jqPolicyId}
         </if>
         <if test="param.syPolicyId != null and param.syPolicyId != ''">
-            and a.sy_policy_id = #{syPolicyId}
+            and a.sy_policy_id = #{param.syPolicyId}
         </if>
         <if test="param.nonCarPolicyId != null and param.nonCarPolicyId != ''">
-            and a.non_car_policy_id = #{nonCarPolicyId}
+            and a.non_car_policy_id = #{param.nonCarPolicyId}
         </if>
         <if test="param.insuranceId != null and param.insuranceId != ''">
-            and a.insurance_id = #{insuranceId}
+            and a.insurance_id = #{param.insuranceId}
         </if>
         <if test="param.risk != null and param.risk != ''">
-            and a.risk = #{risk}
+            and a.risk = #{param.risk}
         </if>
         <if test="param.insuranceName != null and param.insuranceName != ''">
-            and a.insurance_name = #{insuranceName}
+            and a.insurance_name = #{param.insuranceName}
         </if>
         <if test="param.clearingTimeStartTime != null and param.clearingTimeStartTime != ''">
             and a.clearing_time between #{param.clearingTimeStartTime} and #{param.clearingTimeEndTime]}