|
|
@@ -21,6 +21,8 @@ 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 io.swagger.models.auth.In;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
@@ -41,6 +43,7 @@ import org.jeecg.ctop.finance.policy.utils.Check;
|
|
|
import org.jeecg.ctop.finance.policy.utils.ListPageUtil;
|
|
|
import org.jeecg.ctop.finance.settlement.entity.vo.ProfitReportBytedanceVo;
|
|
|
import org.jeecg.ctop.finance.settlement.entity.vo.ProfitReportKuaiShouVo;
|
|
|
+import org.jeecg.ctop.finance.settlement.entity.vo.SettlementFileParamsVo;
|
|
|
import org.jeecg.ctop.finance.settlement.service.serviceImpl.ReportSettlementServiceImpl;
|
|
|
import org.jeecg.modules.ctop.service.IMaterialReportOverViewService;
|
|
|
import org.jeecg.modules.system.service.ISysRoleService;
|
|
|
@@ -63,7 +66,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
|
* 政策信息表
|
|
|
- * @author jeecg-boot
|
|
|
+ * @author jeecg-boot master
|
|
|
* @date 2021-07-27
|
|
|
* @version V1.0
|
|
|
*/
|
|
|
@@ -251,26 +254,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 +476,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");
|
|
|
}
|
|
|
@@ -906,6 +931,11 @@ public class CwjsPolicyInfoController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 提示政策审核任务(接口废弃)
|
|
|
+ * 在定时任务中使用-job为 cwjsPolicyApprovedNoticeWxJob
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@GetMapping(value = "/weiXinNotice")
|
|
|
public Result weiXinNotice(){
|
|
|
CwjsPolicyInfo cwjsPolicyInfo = new CwjsPolicyInfo();
|
|
|
@@ -1027,4 +1057,40 @@ public class CwjsPolicyInfoController {
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询 结算单 没有上传账户图片的账户信息
|
|
|
+ * @param productId 产品id
|
|
|
+ * @param projectId 项目id
|
|
|
+ * @param uploadYears 年-月
|
|
|
+ * @param mediaId 媒体类型 1-头条 2-快手 3-头条内广 4-快手内广
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value="查询结算单没有上传账户图片的账户信息", notes="查询结算单没有上传账户图片的账户信息")
|
|
|
+ @GetMapping(value = "/getSettlementNoPictureAccountList")
|
|
|
+ public Result getSettlementNoPictureAccountList(@RequestParam(name="productId") String productId,
|
|
|
+ @RequestParam(name="projectId") String projectId,
|
|
|
+ @RequestParam(name="uploadYears") String uploadYears,
|
|
|
+ @RequestParam(name="mediaId") String mediaId,
|
|
|
+ @RequestParam(name="userId") String userId,
|
|
|
+ @RequestParam(name="pageNo") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize") Integer pageSize){
|
|
|
+ SettlementFileParamsVo paramsVo = new SettlementFileParamsVo();
|
|
|
+ paramsVo.setProductId(productId);
|
|
|
+ paramsVo.setProjectId(projectId);
|
|
|
+ paramsVo.setUploadYears(uploadYears);
|
|
|
+ paramsVo.setMediaId(Integer.valueOf(mediaId));
|
|
|
+ paramsVo.setUserId(userId);
|
|
|
+ paramsVo.setPageNo(pageNo);
|
|
|
+ paramsVo.setPageSize(pageSize);
|
|
|
+ return cwjsPolicyInfoService.getSettlementNoPictureAccountList(paramsVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|