Ver código fonte

Merge branch 'master' of http://git.minpay.cc/SupplyChain/taskman

tudc 3 anos atrás
pai
commit
7546c1f92a

+ 16 - 7
taskMan/src/main/java/com/huyi/task/taskMan/schedule/FinanceTimedTask.java

@@ -37,6 +37,8 @@ public class FinanceTimedTask {
     private ISysNoticeService iSysNoticeService;
     @Autowired
     private RemoteConfigService configService;
+    @Autowired
+    private ISysUserCompanyRelService sysUserCompanyRelService;
 
     /**
      * 融信消息提醒定时跑批
@@ -81,7 +83,7 @@ public class FinanceTimedTask {
                     //到期前30天发送消息
                     //标题
                     String title = "【融信到期】您持有的一笔融信【"+zfiAmount+"】(大写:"+zfiAmountBig+")的融信【"+zfiNumber+"】将于【"+zfiEffectiveDate+"】失效,请尽快去融资";
-                    remoteSystemService.sendNotice(companyId, zfiId,title,"01","05","","0",user,"");
+                    remoteSystemService.sendNotice(companyId, zfiId,title,"01","05","","0",user,"",null,null);
                 }
             }
         }
@@ -119,7 +121,7 @@ public class FinanceTimedTask {
                     //标题
                     String title = "【融资待办】【"+scyName+"】签发的融信【"+zfiNumber+"】将于【"+zfiEffectiveDate+"】失效," +
                             "融信金额【"+zfiAmount+"】(大写:"+zfiAmountBig+"),请尽快融资";
-                    remoteSystemService.sendNotice(companyId, zfiId,title,"00","","05","0",user,"");
+                    remoteSystemService.sendNotice(companyId, zfiId,title,"00","","05","0",user,"",null,null);
                 }
             }
         }
@@ -186,10 +188,6 @@ public class FinanceTimedTask {
                 for(Map res :list){
                     //主键
                     String zfiId = CommonUtil.objToString(res.get("zfiId"));
-                    //经办人Id
-                    String user = CommonUtil.objToString(res.get("sucrUserId"));
-                    //企业
-                    String companyId = CommonUtil.objToString(res.get("sucrCompanyId"));
                     //融信编号
                     String zfiNumber = CommonUtil.objToString(res.get("zfiNumber"));
                     //签发有效期
@@ -200,13 +198,24 @@ public class FinanceTimedTask {
                     String zfiAmountBig = AmtUtil.convert(AmtUtil.moneyFormat(zfiAmount));
                     //供应商
                     String supplierName = CommonUtil.objToString(res.get("supplierName"));
+                    //平台部门Id
+                    String deptId = configService.selectConfigByKey("platform_dept").getMsg();
+                    //平台部门所含人员
+                    String user = "";
+                    LambdaQueryWrapper<SysUserCompanyRel> companyWrapper = new LambdaQueryWrapper<>();
+                    companyWrapper.eq(SysUserCompanyRel::getSucrDeptId,deptId);
+                    companyWrapper.eq(SysUserCompanyRel::getSucrCompanyId,"000000");
+                    List<SysUserCompanyRel> userList = sysUserCompanyRelService.findSysUserCompanyRels(companyWrapper);
+                    for (SysUserCompanyRel sysUser:userList) {
+                        user += CommonUtil.objToString(sysUser.getSucrUserId())+",";
+                    }
 //                    List userList = new ArrayList();
 //                    userList.add(user);
                     //到期前3天生成平台内部待办
                     //标题
                     String title = "【融资待办】【"+supplierName+"】融信【"+zfiNumber+"】融信金额【"+zfiAmount+"】(大写:"+zfiAmountBig+")" +
                             "将于【"+zfiEffectiveDate+"】失效,请相关人员跟进!";
-                    remoteSystemService.sendNotice(companyId, zfiId,title,"00","","07","0",user,"");
+                    remoteSystemService.sendNotice("000000", zfiId,title,"00","","07","0",user,"","00",null);
                 }
             }
         }

+ 5 - 5
taskMan/src/main/java/com/huyi/task/taskMan/schedule/TimedTask.java

@@ -50,7 +50,7 @@ public class TimedTask {
      * 还款提醒跑批
      */
     @SneakyThrows
-    @Scheduled(cron = "0 0 2 0 * ? ")
+    @Scheduled(cron = "0 0 1 * * ? ")
     private void repaymentRemind(){
         Map map = new HashMap();
         //据当前时间还有30天的日期
@@ -87,11 +87,11 @@ public class TimedTask {
                 if("2".equals(createType)){
                     //到期前30天发送消息
                     String title = "【到期还款】您开立给【"+companyName+"】的一笔【"+amount+"】(大写:"+ ConvertUpMoneyUtil.toChinese(amount)+")的融信【"+number+"】,将于【"+repaymentDate+"】还款,请尽快处理;";
-                    remoteSystemService.sendNotice(companyId, zfrId,title,"01","06","","0",user,"","","");
+                    remoteSystemService.sendNotice(companyId, zfrId,title,"01","06","","0",user,"",null,null);
                 }else{
                     //到期前30天发送消息
                     String title = "【到期还款】您开立给【"+companyName+"】的一笔【"+amount+"】(大写:"+ConvertUpMoneyUtil.toChinese(amount)+")的融信【"+number+"】,将于【"+repaymentDate+"】还款,请尽快处理;";
-                    remoteSystemService.sendNotice(coreCompany, zfrId,title,"01","06","","0",handler,"","","");
+                    remoteSystemService.sendNotice(coreCompany, zfrId,title,"01","06","","0",handler,"",null,null);
                 }
             }
         }
@@ -124,11 +124,11 @@ public class TimedTask {
                 if("2".equals(createType)){
                     //到期前7天生成待办
                     String title = "【还款待办】您签发的融信【"+number+"】将于【"+repaymentDate+"】还款,还款金额【"+amount+"】(大写:"+ ConvertUpMoneyUtil.toChinese(amount)+"),请尽快处理;";
-                    remoteSystemService.sendNotice(companyId, zfrId,title,"00","","06","0",user,"","00","");
+                    remoteSystemService.sendNotice(companyId, zfrId,title,"00","","06","0",user,"","00",null);
                 }else{
                     //到期前7天生成待办
                     String title = "【还款待办】您签发的融信【"+number+"】将于【"+repaymentDate+"】还款,还款金额【"+amount+"】(大写:"+ConvertUpMoneyUtil.toChinese(amount)+"),请尽快处理;";
-                    remoteSystemService.sendNotice(coreCompany, zfrId,title,"00","","06","0",handler,"","00","");
+                    remoteSystemService.sendNotice(coreCompany, zfrId,title,"00","","06","0",handler,"","00",null);
                 }
 
             }