|
@@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
@@ -251,26 +252,43 @@ public class CwjsPolicyInfoController {
|
|
|
if (examineUser.getString("departName").contains("销售")) {
|
|
|
//华北 ---> 自动转老板
|
|
|
if (cwjsPolicyInfo.getCompanyId().equals("d57fecdcf7a94d009736d9c850731582")) {
|
|
|
- //查询 是否符合条件
|
|
|
- List<JSONObject> autoConveryList = cwjsPolicyInfoMapper.selAutoConveryInfo(cwjsPolicyInfo.getAccountingPeriod(), cwjsPolicyInfo.getMediaType(),
|
|
|
- cwjsPolicyInfo.getAdvancePay(), cwjsPolicyInfo.getRebateType(), cwjsPolicyInfo.getRebateRate());
|
|
|
- if (!Check.isNull(autoConveryList)) {
|
|
|
- cwjsPolicyInfoService.automaticConveyBossExamine(cwjsPolicyInfo);
|
|
|
- cwjsPolicyInfoService.updateById(cwjsPolicyInfo);
|
|
|
- log.info("-----自动转老板");
|
|
|
- return Result.successMsg("审核通过", cwjsPolicyInfo);
|
|
|
- } else {
|
|
|
- //结束
|
|
|
- cwjsPolicyInfo.setApprovedStatus(3);
|
|
|
- cwjsPolicyInfoService.updateById(cwjsPolicyInfo);
|
|
|
-
|
|
|
- /**
|
|
|
- * 终审通过后 添加 起始时间
|
|
|
- */
|
|
|
- reportSettlementService.cwjsPRofit(cwjsPolicyInfo);
|
|
|
- return Result.successMsg("审核通过", cwjsPolicyInfo);
|
|
|
+
|
|
|
+ //审核人 如果是 赵旺 则需要单独处理 转审上级 丁兆明
|
|
|
+ //查询审核人 上级
|
|
|
+ JSONObject jsonObject = cwjsPolicyInfoMapper.getUserLeaderByUserId(cwjsPolicyInfo.getApprovedProgress());
|
|
|
+ if (!Check.isNull(jsonObject) &&
|
|
|
+ (StringUtils.equals(cwjsPolicyInfo.getApprovedProgress(),"00d630a129e4487cba5427788a1f08ce")
|
|
|
+ || StringUtils.equals(cwjsPolicyInfo.getApprovedProgress(),"7fb2684c348341d193727e791c75dbeb"))){
|
|
|
+
|
|
|
+ // 下一步审核人
|
|
|
+ cwjsPolicyInfo.setApprovedStatus(1);
|
|
|
+ cwjsPolicyInfo.setApprovedProgress(jsonObject.getString("leaderId")); //设置一下个审核人员
|
|
|
+
|
|
|
+ }else {
|
|
|
+ //查询 是否符合条件
|
|
|
+ List<JSONObject> autoConveryList = cwjsPolicyInfoMapper.selAutoConveryInfo(cwjsPolicyInfo.getAccountingPeriod(), cwjsPolicyInfo.getMediaType(),
|
|
|
+ cwjsPolicyInfo.getAdvancePay(), cwjsPolicyInfo.getRebateType(), cwjsPolicyInfo.getRebateRate());
|
|
|
+ if (!Check.isNull(autoConveryList)) {
|
|
|
+ cwjsPolicyInfoService.automaticConveyBossExamine(cwjsPolicyInfo);
|
|
|
+ cwjsPolicyInfoService.updateById(cwjsPolicyInfo);
|
|
|
+ log.info("-----自动转老板");
|
|
|
+ return Result.successMsg("审核通过", cwjsPolicyInfo);
|
|
|
+ } else {
|
|
|
+ //结束
|
|
|
+ cwjsPolicyInfo.setApprovedStatus(3);
|
|
|
+ cwjsPolicyInfoService.updateById(cwjsPolicyInfo);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 终审通过后 添加 起始时间
|
|
|
+ */
|
|
|
+ reportSettlementService.cwjsPRofit(cwjsPolicyInfo);
|
|
|
+ return Result.successMsg("审核通过", cwjsPolicyInfo);
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
// 下一步审核 分公司总经理
|
|
|
cwjsPolicyInfo.setApprovedStatus(1);
|
|
@@ -456,6 +474,11 @@ public class CwjsPolicyInfoController {
|
|
|
|
|
|
if (StringUtils.equals("saleDirector",createRoleCode)){
|
|
|
directorUserId = cwjsPolicy.getCreateUserId();
|
|
|
+ }else if(StringUtils.equals("00d630a129e4487cba5427788a1f08ce",examineUser.getString("leaderId")) ||
|
|
|
+ StringUtils.equals("7fb2684c348341d193727e791c75dbeb",examineUser.getString("leaderId"))) {
|
|
|
+ //当前审核人是 zhaowang 则下一步审核人是 dingzhaoming
|
|
|
+ directorUserId = "b161b7d9793942f980dbfe8c931cd1b0";
|
|
|
+
|
|
|
}else {
|
|
|
directorUserId = examineUser.getString("leaderId");
|
|
|
}
|