Procházet zdrojové kódy

Merge remote-tracking branch 'origin/test' into test

785834757 před 2 roky
rodič
revize
5402cb8ab4

+ 8 - 1
src/main/java/com/ydtech/modules/admin/model/vo/SysAmountAuditingVo.java

@@ -99,7 +99,7 @@ public class SysAmountAuditingVo {
     private String auditingUserName;
 
 
-    @ApiModelProperty("时间条件")
+    @ApiModelProperty("支付时间时间条件")
     private String  timeFiltering;
 
     @ApiModelProperty("时间条件")
@@ -143,4 +143,11 @@ public class SysAmountAuditingVo {
      */
     @ApiModelProperty(value = "内部账户id")
     private String accountId;
+
+
+    @ApiModelProperty("支付开始时间")
+    private String  startAuditingTime;
+
+    @ApiModelProperty("支付结束时间")
+    private String  endAuditingTime;
 }

+ 7 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysAmountAuditingServiceImpl.java

@@ -183,6 +183,13 @@ public class SysAmountAuditingServiceImpl extends ServiceImpl<SysAmountAuditingM
                 params.put("leaderName",sysAmountAuditingVo.getLeaderName());
             }
 
+            if(StringUtils.isNotEmpty(sysAmountAuditingVo.getStartAuditingTime())){
+                params.put("startAuditingTime",sysAmountAuditingVo.getStartAuditingTime());
+            }
+            if(StringUtils.isNotEmpty(sysAmountAuditingVo.getEndAuditingTime())){
+                params.put("endAuditingTime",sysAmountAuditingVo.getEndAuditingTime());
+            }
+
             List<SysAmountAuditingEntity> list = baseMapper.queryPageOrderNew(params);
             pageHelper=new PageInfo(list);
             BasePageResult<SysAmountAuditingEntity> pageResult=new BasePageResult<SysAmountAuditingEntity>(sysAmountAuditingVo.getPageNum(), sysAmountAuditingVo.getPageSize(), pageHelper.getTotal(), pageHelper.getPages(), list);

+ 14 - 0
src/main/java/com/ydtech/modules/fnc/controller/InsPlyIncomeController.java

@@ -247,6 +247,13 @@ public class InsPlyIncomeController extends BaseController {
         HashMap<String, Object> result = insPlyIncomeService.bxImportOther(multipartFile, isNotCar);
         return HttpResult.ok(result);
     }
+
+    @PutMapping("/bxImportOtherConfirm")
+    @ApiOperation(value = "批量跟单修改比例确认")
+    public HttpResult<HashMap<String, Object>> bxImportOtherConfirm(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeService.bxImportOtherConfirm(insPlyIncomeVo);
+        return HttpResult.ok();
+    }
     @PostMapping("/ptImportOther")
     @ApiOperation(value = "平台批量修改比例(excel)")
     @ApiImplicitParams({
@@ -267,6 +274,13 @@ public class InsPlyIncomeController extends BaseController {
         return HttpResult.ok(result);
     }
 
+    @PutMapping("/noBxImportOtherConfirm")
+    @ApiOperation(value = "非车跟单批量修改比例确认")
+    public HttpResult<HashMap<String, Object>> noBxImportOtherConfirm(@RequestBody InsPlyIncomeVo insPlyIncomeVo) {
+        insPlyIncomeService.noBxImportOtherConfirm(insPlyIncomeVo);
+        return HttpResult.ok();
+    }
+
 
     @PostMapping("/bxOtherImportData")
     @ApiOperation(value = "跟单对账导入(excel)")

+ 5 - 0
src/main/java/com/ydtech/modules/fnc/service/InsPlyIncomeService.java

@@ -173,4 +173,9 @@ public interface InsPlyIncomeService extends IService<InsPlyIncome> {
      * @return
      */
     HashMap<String, Object> ptImportOther(MultipartFile multipartFile);
+
+    void bxImportOtherConfirm(InsPlyIncomeVo insPlyIncomeVo);
+
+    void noBxImportOtherConfirm(InsPlyIncomeVo insPlyIncomeVo);
+
 }

+ 75 - 23
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -2691,12 +2691,12 @@ handlingProportion,
                 if (ObjectUtils.isNotEmpty(byBxLicenseno) && (byBxLicenseno.getJqOtherCostsProportion().compareTo(item.getJqOtherCostsProportion()) != 0 || byBxLicenseno.getSyOtherCostsProportion().compareTo(item.getSyOtherCostsProportion()) != 0)) {
 
 
-                    InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
-                    BeanUtils.copyProperties(byBxLicenseno,insPlyIncomeLog);
-                    insPlyIncomeLog.setOperationStatus("2");
-                    insPlyIncomeLog.setId(null);
-                    insPlyIncomeLog.setIncomeId(byBxLicenseno.getId());
-                    insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
+//                    InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
+//                    BeanUtils.copyProperties(byBxLicenseno,insPlyIncomeLog);
+//                    insPlyIncomeLog.setOperationStatus("2");
+//                    insPlyIncomeLog.setId(null);
+//                    insPlyIncomeLog.setIncomeId(byBxLicenseno.getId());
+//                    insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
 
 
 
@@ -2708,16 +2708,16 @@ handlingProportion,
                     BigDecimal jqOtherAmount  =  getBigDecimal( byBxLicenseno.getJqPremium(),item.getJqOtherCostsProportion());
                     BigDecimal syOtherAmount =  getBigDecimal( byBxLicenseno.getSyPremium(),item.getSyOtherCostsProportion());
 
-                    byBxLicenseno.setJqOtherCostsPremium(jqOtherAmount);
-                    byBxLicenseno.setSyOtherCostsPremium(syOtherAmount);
-                    byBxLicenseno.setJqOtherCostsProportion(jqOtherCostsProportion);
-                    byBxLicenseno.setSyOtherCostsProportion(syOtherCostsProportion);
-                    byBxLicenseno.setOtherFeevalue(this.calculateTotal(jqOtherAmount, syOtherAmount, null));
-                    byBxLicenseno.setOtherFeerate(this.calculateTotal(jqOtherCostsProportion, syOtherCostsProportion, null));
-                    byBxLicenseno.setAllFeeValue(this.calculateTotal(jqOtherAmount, syOtherAmount, null));
-                    byBxLicenseno.setUpdateUserId(BaseController.getUser().getId());
-                    byBxLicenseno.setUpdateUserName(BaseController.getUser().getName());
-                    baseMapper.updateById(byBxLicenseno);
+//                    byBxLicenseno.setJqOtherCostsPremium(jqOtherAmount);
+//                    byBxLicenseno.setSyOtherCostsPremium(syOtherAmount);
+//                    byBxLicenseno.setJqOtherCostsProportion(jqOtherCostsProportion);
+//                    byBxLicenseno.setSyOtherCostsProportion(syOtherCostsProportion);
+//                    byBxLicenseno.setOtherFeevalue(this.calculateTotal(jqOtherAmount, syOtherAmount, null));
+//                    byBxLicenseno.setOtherFeerate(this.calculateTotal(jqOtherCostsProportion, syOtherCostsProportion, null));
+//                    byBxLicenseno.setAllFeeValue(this.calculateTotal(jqOtherAmount, syOtherAmount, null));
+//                    byBxLicenseno.setUpdateUserId(BaseController.getUser().getId());
+//                    byBxLicenseno.setUpdateUserName(BaseController.getUser().getName());
+//                    baseMapper.updateById(byBxLicenseno);
 
 
                     HashMap<String, Object> map = new HashMap<>();
@@ -2731,6 +2731,7 @@ handlingProportion,
 
                     map.put("otherFeevalue", byBxLicenseno.getOtherFeevalue());
                     map.put("otherFeerate", byBxLicenseno.getOtherFeerate());
+                    map.put("id", byBxLicenseno.getId());
                     resultList.add(map);
                     allAmount = allAmount.add(jqOtherAmount).add(syOtherAmount);
                 }
@@ -2744,6 +2745,33 @@ handlingProportion,
         return resultMap;
     }
 
+    @Override
+    @Transactional
+    public void bxImportOtherConfirm(InsPlyIncomeVo insPlyIncomeVo) {
+        if (ObjectUtils.isEmpty(insPlyIncomeVo)) {
+            throw new SystemException("请导入文件");
+        }
+        if (!CollectionUtils.isEmpty(insPlyIncomeVo.getResultList())) {
+            for (InsPlyIncome item : insPlyIncomeVo.getResultList()) {
+                InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
+                BeanUtils.copyProperties(item,insPlyIncomeLog);
+                insPlyIncomeLog.setOperationStatus("2");
+                insPlyIncomeLog.setId(null);
+                insPlyIncomeLog.setIncomeId(item.getId());
+                insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
+
+//                item.setOtherFeevalue(this.calculateTotal(item.getJqOtherCostsPremium(), item.getSyOtherCostsPremium(), null));
+//                item.setOtherFeerate(this.calculateTotal(item.getJqOtherCostsProportion(), item.getSyOtherCostsProportion(), null));
+                item.setAllFeeValue(this.calculateTotal(item.getJqOtherCostsPremium(), item.getSyOtherCostsPremium(), null));
+                item.setUpdateUserId(BaseController.getUser().getId());
+                item.setUpdateUserName(BaseController.getUser().getName());
+                baseMapper.updateById(item);
+            }
+        }
+    }
+
+
+
     @Override
     public HashMap<String, Object> ptImportOther(MultipartFile multipartFile) {
         HashMap<String, Object> resultMap = new HashMap<>();
@@ -2919,20 +2947,22 @@ handlingProportion,
 
                     BigDecimal noOtherAmount =  getBigDecimal( noNoTaxPremium,item.getNoOtherCostsProportion());
 
-                    byBxLicenseno.setNoOtherCostsPremium(noOtherAmount);
-                    byBxLicenseno.setNoOtherCostsProportion(item.getNoOtherCostsProportion());
-                    byBxLicenseno.setAllFeeValue(this.calculateTotal(noOtherAmount, null, null));
-
-                    byBxLicenseno.setOtherFeevalue(this.calculateTotal(noOtherAmount, null, null));
-                    byBxLicenseno.setOtherFeerate(this.calculateTotal(noOtherCostsProportion, null, null));
-                    baseMapper.updateById(byBxLicenseno);
+//                    byBxLicenseno.setNoOtherCostsPremium(noOtherAmount);
+//                    byBxLicenseno.setNoOtherCostsProportion(item.getNoOtherCostsProportion());
+//                    byBxLicenseno.setAllFeeValue(this.calculateTotal(noOtherAmount, null, null));
+//
+//                    byBxLicenseno.setOtherFeevalue(this.calculateTotal(noOtherAmount, null, null));
+//                    byBxLicenseno.setOtherFeerate(this.calculateTotal(noOtherCostsProportion, null, null));
+//                    baseMapper.updateById(byBxLicenseno);
 
                     newMap.put("licenseno", item.getLicenseno());
                     newMap.put("noPolicyno", item.getNoPolicyno());
                     newMap.put("noOtherCostsPremium", noOtherAmount);
+                    newMap.put("noOtherCostsProportion", item.getNoOtherCostsProportion());
 
                     newMap.put("otherFeevalue", byBxLicenseno.getOtherFeevalue());
                     newMap.put("otherFeerate", byBxLicenseno.getOtherFeerate());
+                    newMap.put("id", byBxLicenseno.getId());
                     resultList.add(newMap);
                     allAmount = allAmount.add(noOtherAmount);
                 }
@@ -2945,6 +2975,28 @@ handlingProportion,
         return resultMap;
     }
 
+    @Override
+    @Transactional
+    public void noBxImportOtherConfirm(InsPlyIncomeVo insPlyIncomeVo) {
+        if (ObjectUtils.isEmpty(insPlyIncomeVo)) {
+            throw new SystemException("请导入文件");
+        }
+        if (!CollectionUtils.isEmpty(insPlyIncomeVo.getResultList())) {
+            for (InsPlyIncome item : insPlyIncomeVo.getResultList()) {
+                InsPlyIncomeLog insPlyIncomeLog = new InsPlyIncomeLog();
+                insPlyIncomeLog.setIncomeId(item.getId());
+                BeanUtils.copyProperties(item,insPlyIncomeLog);
+                insPlyIncomeLog.setOperationStatus("2");
+                insPlyIncomeLog.setId(null);
+                insPlyIncomeLogService.saveLog(insPlyIncomeLog);  //添加日志
+                item.setAllFeeValue(this.calculateTotal(item.getNoOtherCostsPremium(), null, null));
+                item.setOtherFeevalue(this.calculateTotal(item.getNoOtherCostsPremium(), null, null));
+                item.setOtherFeerate(this.calculateTotal(item.getNoOtherCostsProportion(), null, null));
+                baseMapper.updateById(item);
+            }
+        }
+    }
+
     @Override
     public void batchUpdateVoucher(InsPlyIncomeVo insPlyIncomeVo) {
         String s = insPlyIncomeVo.getSelectIds().get(0);

+ 5 - 0
src/main/java/com/ydtech/modules/fnc/vo/InsPlyIncomeVo.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ydtech.modules.fnc.entity.InsPlyIncome;
 import com.ydtech.modules.order.entity.po.InsUploadFiles;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -410,4 +411,8 @@ public class InsPlyIncomeVo implements Serializable {
 
     @ApiModelProperty("创建时间查询结束")
     private String createTimeEnd;
+
+
+    @ApiModelProperty("批量修改结果")
+    private List<InsPlyIncome> resultList;
 }

+ 6 - 1
src/main/resources/mapper/modules/admin/SysAmountAuditingMapper.xml

@@ -161,7 +161,9 @@
             <if test="userId !=null  and userId != ''">
                 and a.user_id=#{userId}
             </if>
-
+            <if test="startAuditingTime !=null and startAuditingTime != '' and endAuditingTime !=null and endAuditingTime != ''">
+                AND   DATE_FORMAT( a.auditing_time, '%Y-%m-%d')   BETWEEN #{startAuditingTime} AND #{endAuditingTime}
+            </if>
             <if test="startDate !=null and startDate != ''  and  endDate !=null  and  endDate!= '' ">
                 and DATE_FORMAT( a.create_time, '%Y-%m-%d')  between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')
             </if>
@@ -281,6 +283,9 @@
             <if test="vo.userName !=null  and vo.userName != ''">
                 and su.name=#{vo.userName}
             </if>
+            <if test="vo.startAuditingTime !=null and vo.startAuditingTime != '' and vo.endAuditingTime !=null and vo.endAuditingTime != ''">
+                AND   DATE_FORMAT( a.auditing_time, '%Y-%m-%d')   BETWEEN #{vo.startAuditingTime} AND #{vo.endAuditingTime}
+            </if>
             <if test="vo.userId !=null  and vo.userId != ''">
                 and a.user_id=#{vo.userId}
             </if>