|
@@ -1,8 +1,12 @@
|
|
|
package org.jeecg.ctop.finance.settlement.controller;
|
|
|
|
|
|
+import cn.com.ctop.common.module.service.impl.SysUserServiceImpl;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.checkerframework.checker.units.qual.A;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.ctop.finance.policy.mapper.CwjsPolicyInfoMapper;
|
|
|
+import org.jeecg.ctop.finance.policy.service.impl.CwjsPolicyInfoServiceImpl;
|
|
|
import org.jeecg.ctop.finance.policy.utils.Check;
|
|
|
import org.jeecg.ctop.finance.settlement.entity.pojo.ctopCwjsSettlementInfo;
|
|
|
|
|
@@ -15,6 +19,8 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
@@ -78,7 +84,6 @@ public class SettlementController {
|
|
|
@ApiOperation(value="财务结算-上传账户", notes="财务结算-上传账户")
|
|
|
@PostMapping("/settlementAccountImport")
|
|
|
public Result settlementAccountImport(ctopCwjsSettlementInfo settlementInfo,@RequestParam("file") MultipartFile files) {
|
|
|
-
|
|
|
if (files.isEmpty()){
|
|
|
return Result.errorMsg("附件不能为空!");
|
|
|
}
|
|
@@ -86,4 +91,42 @@ public class SettlementController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CwjsPolicyInfoServiceImpl cwjsPolicyInfoService;
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value="财务结算-获取负责人下拉列表", notes="财务结算-获取负责人下拉列表")
|
|
|
+ @GetMapping("/getResponsibleUserByIds")
|
|
|
+ public Result getResponsibleUserByIds(@RequestParam("userId") String userId) {
|
|
|
+ //查询用户角色
|
|
|
+ String roleCode = sysRoleService.getRoleCodeByUserId(userId);
|
|
|
+ //普通用户
|
|
|
+ Set<String> ids = new HashSet<String>(){{
|
|
|
+ add(userId);
|
|
|
+ }};
|
|
|
+ if ("admin".equals(roleCode)){
|
|
|
+ //查询所有销售 && 媒介
|
|
|
+ List allSaleList = cwjsPolicyInfoService.getAllSaleAndMeidaManager();
|
|
|
+ return Result.successMsg("查询所有销售和媒介用户。",allSaleList);
|
|
|
+
|
|
|
+ }else if ("saleDirector".equals(roleCode) || //销售总监
|
|
|
+ "kuaishou_operations_director".equals(roleCode) || //快手运营总监
|
|
|
+ "toutiao_operations_manager".equals(roleCode) || // 头条运营经理
|
|
|
+ "externalOperationManager".equals(roleCode) || //外部运营经理
|
|
|
+ "genera_manager_of_operations".equals(roleCode) || //运营总经理
|
|
|
+ "toutiao_operations_director".equals(roleCode) || //头条运营总监
|
|
|
+ "kuaishou_operations_manager".equals(roleCode) //快手运营经理
|
|
|
+ ){
|
|
|
+ //查询所有包含自己的下级
|
|
|
+ ids = materialReportOverViewService.recursiveQuerySubordinate(userId);
|
|
|
+ }
|
|
|
+ List<Map<String,Object>> list = settlementInfoService.getUserByIds(ids);
|
|
|
+ return Result.successMsg("查询用户!",list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|