安全风险清单更改,台账排序优化

This commit is contained in:
郭文豪 2024-08-20 17:50:51 +08:00
parent ccaf0dbeae
commit 3a2a9e1740
6 changed files with 125 additions and 106 deletions

View File

@ -158,7 +158,7 @@ public class BusPlanningController extends JeecgController<BusPlanning, IBusPlan
result.setResult(pageList); result.setResult(pageList);
return result; return result;
} }
/** /**
* 添加 * 添加
* *
@ -182,7 +182,7 @@ public class BusPlanningController extends JeecgController<BusPlanning, IBusPlan
busStartOrderService.updateById(startOrder); busStartOrderService.updateById(startOrder);
return Result.OK("添加成功!",returnBean); return Result.OK("添加成功!",returnBean);
} }
/** /**
* 编辑 * 编辑
* *
@ -198,7 +198,7 @@ public class BusPlanningController extends JeecgController<BusPlanning, IBusPlan
busPlanningService.updateBusPlanningMainById(busPlanning); busPlanningService.updateBusPlanningMainById(busPlanning);
return Result.OK("编辑成功!",busPlanning); return Result.OK("编辑成功!",busPlanning);
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -217,7 +217,7 @@ public class BusPlanningController extends JeecgController<BusPlanning, IBusPlan
busPlanningService.removeSonByProject(busStartOrder.getProjectId(),id); busPlanningService.removeSonByProject(busStartOrder.getProjectId(),id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *

View File

@ -47,6 +47,9 @@ public class BusPlanning implements Serializable {
@Excel(name = "部门code", width = 15) @Excel(name = "部门code", width = 15)
@ApiModelProperty(value = "部门code") @ApiModelProperty(value = "部门code")
private String departmentCode; private String departmentCode;
/**风险安全清单*/
@ApiModelProperty(value = "风险安全清单")
private String busAqfxqd;
/**创建人*/ /**创建人*/
@Excel(name = "创建人", width = 15) @Excel(name = "创建人", width = 15)
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")

View File

@ -83,4 +83,7 @@ public class BusPlanningMain implements Serializable {
private List<BusAqfxqd> busAqfxqdList; private List<BusAqfxqd> busAqfxqdList;
/**风险安全清单*/
private String busAqfxqd;
} }

View File

@ -21,7 +21,7 @@ import java.util.Map;
/** /**
* @Description: 项目实施策划 * @Description: 项目实施策划
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2022-01-24 * @Date: 2022-01-24
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
@ -34,40 +34,43 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
private BusAqfxqdMapper busAqfxqdMapper; private BusAqfxqdMapper busAqfxqdMapper;
@Autowired @Autowired
private BusImplementZybzchMapper busImplementZybzchMapper; private BusImplementZybzchMapper busImplementZybzchMapper;
/** /**
* 项目实施策划分页 * 项目实施策划分页
*
* @param page * @param page
* @param busPlanning * @param busPlanning
* @return * @return
*/ */
public Page<BusPlanningQuery> pageByParams(Page<BusPlanningQuery> page, BusPlanningQuery busPlanning){ public Page<BusPlanningQuery> pageByParams(Page<BusPlanningQuery> page, BusPlanningQuery busPlanning) {
LoginUser loginUser = LoginUtil.getLoginUser(); LoginUser loginUser = LoginUtil.getLoginUser();
String whereSql=""; String whereSql = "";
if("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))){ if ("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))) {
whereSql=" p.create_user='"+loginUser.getId()+"'"; whereSql = " p.create_user='" + loginUser.getId() + "'";
}else{ } else {
List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId()); List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId());
if(list!=null&&list.size()>0){ if (list != null && list.size() > 0) {
whereSql=" ("; whereSql = " (";
String s =""; String s = "";
int size = list.size(); int size = list.size();
for(int k=0;k<size;k++){ for (int k = 0; k < size; k++) {
s = StringUtils.strTrim(list.get(k)); s = StringUtils.strTrim(list.get(k));
if(!"".equals(s)){ if (!"".equals(s)) {
if(k==(size-1)){ if (k == (size - 1)) {
whereSql=whereSql+" p.department_code='"+s+"'"; whereSql = whereSql + " p.department_code='" + s + "'";
}else{ } else {
whereSql=whereSql+" p.department_code='"+s+"' or "; whereSql = whereSql + " p.department_code='" + s + "' or ";
} }
} }
} }
whereSql=whereSql+" )"; whereSql = whereSql + " )";
}else{ } else {
whereSql= " p.create_user='-123'";//其实就是为了不查询出数据 whereSql = " p.create_user='-123'";//其实就是为了不查询出数据
} }
} }
return this.baseMapper.pageByParams(page,busPlanning,whereSql); return this.baseMapper.pageByParams(page, busPlanning, whereSql);
} }
@Autowired @Autowired
private IBusUserResponsibleDepartmentService userResponsibleDepartmentService; private IBusUserResponsibleDepartmentService userResponsibleDepartmentService;
@ -97,19 +100,21 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
/** /**
* 主副表存值 更新 * 主副表存值 更新
*
* @param busPlanningMain * @param busPlanningMain
*/ */
public void updateBusPlanningMainById(BusPlanningMain busPlanningMain){ public void updateBusPlanningMainById(BusPlanningMain busPlanningMain) {
BusPlanning busPlanning=new BusPlanning(); BusPlanning busPlanning = new BusPlanning();
BeanUtils.copyProperties(busPlanningMain, busPlanning); BeanUtils.copyProperties(busPlanningMain, busPlanning);
this.baseMapper.updateById(busPlanning); this.baseMapper.updateById(busPlanning);
String projectId = busPlanningMain.getProjectId(); String projectId = busPlanningMain.getProjectId();
BusProductService byId = busProductServiceMapper.selectById(projectId); BusProductService byId = busProductServiceMapper.selectById(projectId);
this.deleteSon(projectId,busPlanningMain.getId()); this.deleteSon(projectId, busPlanningMain.getId());
busPlanningMain.setId(busPlanning.getId()); busPlanningMain.setId(busPlanning.getId());
this.insertBase(projectId,busPlanningMain,byId); this.insertBase(projectId, busPlanningMain, byId);
} }
private void deleteSon(String projectId,String id){
private void deleteSon(String projectId, String id) {
busImplementGoalsMapper.deleteByProjectId(projectId); busImplementGoalsMapper.deleteByProjectId(projectId);
busQualityPlanningMapper.deleteByProjectId(projectId); busQualityPlanningMapper.deleteByProjectId(projectId);
busRiskAnalysisMapper.deleteByProjectId(projectId); busRiskAnalysisMapper.deleteByProjectId(projectId);
@ -123,13 +128,15 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
busContractZscqMapper.deleteByProjectId(projectId); busContractZscqMapper.deleteByProjectId(projectId);
busAqfxqdMapper.deleteByProjectId(projectId); busAqfxqdMapper.deleteByProjectId(projectId);
busImplementZybzchMapper.deleteByProjectId(projectId); busImplementZybzchMapper.deleteByProjectId(projectId);
} }
/** /**
* 主副表存值 * 主副表存值
*
* @param busPlanningMain * @param busPlanningMain
*/ */
public BusPlanning saveMain(BusPlanningMain busPlanningMain){ public BusPlanning saveMain(BusPlanningMain busPlanningMain) {
BusPlanning busPlanning=new BusPlanning(); BusPlanning busPlanning = new BusPlanning();
BeanUtils.copyProperties(busPlanningMain, busPlanning); BeanUtils.copyProperties(busPlanningMain, busPlanning);
this.baseMapper.insert(busPlanning); this.baseMapper.insert(busPlanning);
String projectId = busPlanningMain.getProjectId(); String projectId = busPlanningMain.getProjectId();
@ -138,15 +145,15 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
byId.setProposalFinsh(1); byId.setProposalFinsh(1);
busProductServiceMapper.updateById(byId); busProductServiceMapper.updateById(byId);
busPlanningMain.setId(busPlanning.getId()); busPlanningMain.setId(busPlanning.getId());
this.insertBase(projectId,busPlanningMain,byId); this.insertBase(projectId, busPlanningMain, byId);
return busPlanning; return busPlanning;
} }
private void insertBase(String projectId ,BusPlanningMain busPlanningMain,BusProductService byId){ private void insertBase(String projectId, BusPlanningMain busPlanningMain, BusProductService byId) {
String cachId = busPlanningMain.getId(); String cachId = busPlanningMain.getId();
String taskBearingDepartment = byId.getTaskBearingDepartment(); String taskBearingDepartment = byId.getTaskBearingDepartment();
/**实施目标*/ /**实施目标*/
BusImplementGoals busImplementGoals=new BusImplementGoals(); BusImplementGoals busImplementGoals = new BusImplementGoals();
busImplementGoals.setProjectId(projectId); busImplementGoals.setProjectId(projectId);
busImplementGoals.setImplementGoals(busPlanningMain.getImplementGoals()); busImplementGoals.setImplementGoals(busPlanningMain.getImplementGoals());
busImplementGoals.setDepartmentCode(taskBearingDepartment); busImplementGoals.setDepartmentCode(taskBearingDepartment);
@ -155,7 +162,7 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
busImplementGoalsMapper.insert(busImplementGoals); busImplementGoalsMapper.insert(busImplementGoals);
/**质量策划*/ /**质量策划*/
BusQualityPlanning busQualityPlanning=new BusQualityPlanning(); BusQualityPlanning busQualityPlanning = new BusQualityPlanning();
busQualityPlanning.setProjectId(projectId); busQualityPlanning.setProjectId(projectId);
busQualityPlanning.setQualityPlanning(busPlanningMain.getQualityPlanning()); busQualityPlanning.setQualityPlanning(busPlanningMain.getQualityPlanning());
busQualityPlanning.setDepartmentCode(taskBearingDepartment); busQualityPlanning.setDepartmentCode(taskBearingDepartment);
@ -163,7 +170,7 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
busQualityPlanning.setCreateUser(LoginUtil.getLoginUserId()); busQualityPlanning.setCreateUser(LoginUtil.getLoginUserId());
busQualityPlanningMapper.insert(busQualityPlanning); busQualityPlanningMapper.insert(busQualityPlanning);
/**风险分析识别与管理策划*/ /**风险分析识别与管理策划*/
BusRiskAnalysis busRiskAnalysis=new BusRiskAnalysis(); BusRiskAnalysis busRiskAnalysis = new BusRiskAnalysis();
busRiskAnalysis.setProjectId(projectId); busRiskAnalysis.setProjectId(projectId);
busRiskAnalysis.setRiskAnalysis(busPlanningMain.getRiskAnalysis()); busRiskAnalysis.setRiskAnalysis(busPlanningMain.getRiskAnalysis());
busRiskAnalysis.setDepartmentCode(taskBearingDepartment); busRiskAnalysis.setDepartmentCode(taskBearingDepartment);
@ -174,10 +181,10 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
* 任务分解与分工 * 任务分解与分工
*/ */
List<BusDivisionLabour> busDivisionLabourList = busPlanningMain.getBusDivisionLabourList(); List<BusDivisionLabour> busDivisionLabourList = busPlanningMain.getBusDivisionLabourList();
if(busDivisionLabourList!=null&&busDivisionLabourList.size()>0){ if (busDivisionLabourList != null && busDivisionLabourList.size() > 0) {
BusDivisionLabour busDivisionLabour=null; BusDivisionLabour busDivisionLabour = null;
for (int i = 0; i < busDivisionLabourList.size(); i++) { for (int i = 0; i < busDivisionLabourList.size(); i++) {
busDivisionLabour= busDivisionLabourList.get(i); busDivisionLabour = busDivisionLabourList.get(i);
busDivisionLabour.setProjectId(projectId); busDivisionLabour.setProjectId(projectId);
busDivisionLabour.setDepartmentCode(taskBearingDepartment); busDivisionLabour.setDepartmentCode(taskBearingDepartment);
busDivisionLabour.setCreateTime(CommonDateUtil.getNowTime("yyyy-MM-dd HH:mm:ss")); busDivisionLabour.setCreateTime(CommonDateUtil.getNowTime("yyyy-MM-dd HH:mm:ss"));
@ -189,8 +196,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
* 合同验收策划 * 合同验收策划
*/ */
List<BusContractAcceptance> busContractAcceptanceList = busPlanningMain.getBusContractAcceptanceList(); List<BusContractAcceptance> busContractAcceptanceList = busPlanningMain.getBusContractAcceptanceList();
if(busContractAcceptanceList!=null&&busContractAcceptanceList.size()>0){ if (busContractAcceptanceList != null && busContractAcceptanceList.size() > 0) {
BusContractAcceptance busContractAcceptance =null; BusContractAcceptance busContractAcceptance = null;
for (int i = 0; i < busContractAcceptanceList.size(); i++) { for (int i = 0; i < busContractAcceptanceList.size(); i++) {
busContractAcceptance = busContractAcceptanceList.get(i); busContractAcceptance = busContractAcceptanceList.get(i);
busContractAcceptance.setProjectId(projectId); busContractAcceptance.setProjectId(projectId);
@ -204,8 +211,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
* 项目组组成及职责分工 * 项目组组成及职责分工
*/ */
List<BusDivisionDuties> busDivisionDutiesList = busPlanningMain.getBusDivisionDutiesList(); List<BusDivisionDuties> busDivisionDutiesList = busPlanningMain.getBusDivisionDutiesList();
if(busDivisionDutiesList!=null&&busDivisionDutiesList.size()>0){ if (busDivisionDutiesList != null && busDivisionDutiesList.size() > 0) {
BusDivisionDuties busDivisionDuties =null; BusDivisionDuties busDivisionDuties = null;
for (int i = 0; i < busDivisionDutiesList.size(); i++) { for (int i = 0; i < busDivisionDutiesList.size(); i++) {
busDivisionDuties = busDivisionDutiesList.get(i); busDivisionDuties = busDivisionDutiesList.get(i);
busDivisionDuties.setProjectId(projectId); busDivisionDuties.setProjectId(projectId);
@ -219,8 +226,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
* 外部协作策划 * 外部协作策划
*/ */
List<BusExternalCollaboration> busExternalCollaborationList = busPlanningMain.getBusExternalCollaborationList(); List<BusExternalCollaboration> busExternalCollaborationList = busPlanningMain.getBusExternalCollaborationList();
if(busExternalCollaborationList!=null&&busExternalCollaborationList.size()>0){ if (busExternalCollaborationList != null && busExternalCollaborationList.size() > 0) {
BusExternalCollaboration busExternalCollaboration =null; BusExternalCollaboration busExternalCollaboration = null;
for (int i = 0; i < busExternalCollaborationList.size(); i++) { for (int i = 0; i < busExternalCollaborationList.size(); i++) {
busExternalCollaboration = busExternalCollaborationList.get(i); busExternalCollaboration = busExternalCollaborationList.get(i);
busExternalCollaboration.setProjectId(projectId); busExternalCollaboration.setProjectId(projectId);
@ -236,8 +243,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
* 项目财务策划 * 项目财务策划
*/ */
List<BusProjectFinancialPlanning> busProjectFinancialPlanningList = busPlanningMain.getBusProjectFinancialPlanningList(); List<BusProjectFinancialPlanning> busProjectFinancialPlanningList = busPlanningMain.getBusProjectFinancialPlanningList();
if(busProjectFinancialPlanningList!=null&&busProjectFinancialPlanningList.size()>0){ if (busProjectFinancialPlanningList != null && busProjectFinancialPlanningList.size() > 0) {
BusProjectFinancialPlanning busProjectFinancialPlanning =null; BusProjectFinancialPlanning busProjectFinancialPlanning = null;
for (int i = 0; i < busProjectFinancialPlanningList.size(); i++) { for (int i = 0; i < busProjectFinancialPlanningList.size(); i++) {
busProjectFinancialPlanning = busProjectFinancialPlanningList.get(i); busProjectFinancialPlanning = busProjectFinancialPlanningList.get(i);
busProjectFinancialPlanning.setProjectId(projectId); busProjectFinancialPlanning.setProjectId(projectId);
@ -252,10 +259,10 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
* 项目外协支出策划 * 项目外协支出策划
*/ */
List<BusProjectOutsourcingExpenditurePlanning> busProjectOutsourcingExpenditurePlanningList = busPlanningMain.getBusProjectOutsourcingExpenditurePlanningList(); List<BusProjectOutsourcingExpenditurePlanning> busProjectOutsourcingExpenditurePlanningList = busPlanningMain.getBusProjectOutsourcingExpenditurePlanningList();
if(busProjectOutsourcingExpenditurePlanningList!=null&&busProjectOutsourcingExpenditurePlanningList.size()>0){ if (busProjectOutsourcingExpenditurePlanningList != null && busProjectOutsourcingExpenditurePlanningList.size() > 0) {
BusProjectOutsourcingExpenditurePlanning busProjectOutsourcingExpenditurePlanning =null; BusProjectOutsourcingExpenditurePlanning busProjectOutsourcingExpenditurePlanning = null;
for (int i = 0; i < busProjectOutsourcingExpenditurePlanningList.size(); i++) { for (int i = 0; i < busProjectOutsourcingExpenditurePlanningList.size(); i++) {
busProjectOutsourcingExpenditurePlanning = busProjectOutsourcingExpenditurePlanningList.get(i); busProjectOutsourcingExpenditurePlanning = busProjectOutsourcingExpenditurePlanningList.get(i);
busProjectOutsourcingExpenditurePlanning.setProjectId(projectId); busProjectOutsourcingExpenditurePlanning.setProjectId(projectId);
busProjectOutsourcingExpenditurePlanning.setDepartmentCode(taskBearingDepartment); busProjectOutsourcingExpenditurePlanning.setDepartmentCode(taskBearingDepartment);
busProjectOutsourcingExpenditurePlanning.setCreateTime(CommonDateUtil.getNowTime("yyyy-MM-dd HH:mm:ss")); busProjectOutsourcingExpenditurePlanning.setCreateTime(CommonDateUtil.getNowTime("yyyy-MM-dd HH:mm:ss"));
@ -266,8 +273,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
} }
List<BusContractGjch> busContractGjchList = busPlanningMain.getBusContractGjchList(); List<BusContractGjch> busContractGjchList = busPlanningMain.getBusContractGjchList();
if(busContractGjchList!=null&&busContractGjchList.size()>0){ if (busContractGjchList != null && busContractGjchList.size() > 0) {
BusContractGjch busContractGjch =null; BusContractGjch busContractGjch = null;
for (int i = 0; i < busContractGjchList.size(); i++) { for (int i = 0; i < busContractGjchList.size(); i++) {
busContractGjch = busContractGjchList.get(i); busContractGjch = busContractGjchList.get(i);
busContractGjch.setProjectId(projectId); busContractGjch.setProjectId(projectId);
@ -279,8 +286,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
} }
List<BusContractZscq> busContractZscqList = busPlanningMain.getBusContractZscqList(); List<BusContractZscq> busContractZscqList = busPlanningMain.getBusContractZscqList();
if(busContractZscqList!=null&&busContractZscqList.size()>0){ if (busContractZscqList != null && busContractZscqList.size() > 0) {
BusContractZscq busContractZscq =null; BusContractZscq busContractZscq = null;
for (int i = 0; i < busContractZscqList.size(); i++) { for (int i = 0; i < busContractZscqList.size(); i++) {
busContractZscq = busContractZscqList.get(i); busContractZscq = busContractZscqList.get(i);
busContractZscq.setProjectId(projectId); busContractZscq.setProjectId(projectId);
@ -292,7 +299,7 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
} }
List<BusAqfxqd> busAqfxqdList = busPlanningMain.getBusAqfxqdList(); /*List<BusAqfxqd> busAqfxqdList = busPlanningMain.getBusAqfxqdList();
if(busAqfxqdList!=null&&busAqfxqdList.size()>0){ if(busAqfxqdList!=null&&busAqfxqdList.size()>0){
BusAqfxqd busAqfxqd =null; BusAqfxqd busAqfxqd =null;
for (int i = 0; i < busAqfxqdList.size(); i++) { for (int i = 0; i < busAqfxqdList.size(); i++) {
@ -303,12 +310,10 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
busAqfxqd.setCreateUser(LoginUtil.getLoginUserId()); busAqfxqd.setCreateUser(LoginUtil.getLoginUserId());
busAqfxqdMapper.insert(busAqfxqd); busAqfxqdMapper.insert(busAqfxqd);
} }
} }*/
/**实施目标*/ /**实施目标*/
BusImplementZybzch busImplementZybzch=new BusImplementZybzch(); BusImplementZybzch busImplementZybzch = new BusImplementZybzch();
busImplementZybzch.setProjectId(projectId); busImplementZybzch.setProjectId(projectId);
busImplementZybzch.setZybzch(busPlanningMain.getZybzch()); busImplementZybzch.setZybzch(busPlanningMain.getZybzch());
busImplementZybzch.setDepartmentCode(taskBearingDepartment); busImplementZybzch.setDepartmentCode(taskBearingDepartment);
@ -319,83 +324,90 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
/** /**
* 删除子表 * 删除子表
*
* @param projectId * @param projectId
*/ */
public void removeSonByProject(String projectId,String id){ public void removeSonByProject(String projectId, String id) {
this.deleteSon(projectId,id); this.deleteSon(projectId, id);
} }
/** /**
* 查询项目实施策划 查询是否可更改 为0 的值 * 查询项目实施策划 查询是否可更改 为0 的值
*
* @param loginUserOrgCode * @param loginUserOrgCode
* @return * @return
*/ */
public List<Map> queryPlanning(String loginUserOrgCode){ public List<Map> queryPlanning(String loginUserOrgCode) {
LoginUser loginUser = LoginUtil.getLoginUser(); LoginUser loginUser = LoginUtil.getLoginUser();
String whereSql=""; String whereSql = "";
if("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))){ if ("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))) {
whereSql=" so.create_user='"+loginUser.getId()+"'"; whereSql = " so.create_user='" + loginUser.getId() + "'";
}else{ } else {
List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId()); List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId());
if(list!=null&&list.size()>0){ if (list != null && list.size() > 0) {
whereSql=" ("; whereSql = " (";
String s =""; String s = "";
int size = list.size(); int size = list.size();
for(int k=0;k<size;k++){ for (int k = 0; k < size; k++) {
s = StringUtils.strTrim(list.get(k)); s = StringUtils.strTrim(list.get(k));
if(!"".equals(s)){ if (!"".equals(s)) {
if(k==(size-1)){ if (k == (size - 1)) {
whereSql=whereSql+" so.department_code='"+s+"'"; whereSql = whereSql + " so.department_code='" + s + "'";
}else{ } else {
whereSql=whereSql+" so.department_code='"+s+"' or "; whereSql = whereSql + " so.department_code='" + s + "' or ";
} }
} }
} }
whereSql=whereSql+" )"; whereSql = whereSql + " )";
}else{ } else {
whereSql= " so.create_user='-123'";//其实就是为了不查询出数据 whereSql = " so.create_user='-123'";//其实就是为了不查询出数据
} }
} }
return this.baseMapper.queryPlanning(loginUserOrgCode,whereSql); return this.baseMapper.queryPlanning(loginUserOrgCode, whereSql);
} }
/** /**
* 查询 项目实施策划的项目 * 查询 项目实施策划的项目
*
* @param loginUserOrgCode * @param loginUserOrgCode
* @return * @return
*/ */
public List<Map> queryPlanningAll(String loginUserOrgCode){ public List<Map> queryPlanningAll(String loginUserOrgCode) {
LoginUser loginUser = LoginUtil.getLoginUser(); LoginUser loginUser = LoginUtil.getLoginUser();
String whereSql=""; String whereSql = "";
if("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))){ if ("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))) {
whereSql=" so.create_user='"+loginUser.getId()+"'"; whereSql = " so.create_user='" + loginUser.getId() + "'";
}else{ } else {
List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId()); List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId());
if(list!=null&&list.size()>0){ if (list != null && list.size() > 0) {
whereSql=" ("; whereSql = " (";
String s =""; String s = "";
int size = list.size(); int size = list.size();
for(int k=0;k<size;k++){ for (int k = 0; k < size; k++) {
s = StringUtils.strTrim(list.get(k)); s = StringUtils.strTrim(list.get(k));
if(!"".equals(s)){ if (!"".equals(s)) {
if(k==(size-1)){ if (k == (size - 1)) {
whereSql=whereSql+" so.department_code='"+s+"'"; whereSql = whereSql + " so.department_code='" + s + "'";
}else{ } else {
whereSql=whereSql+" so.department_code='"+s+"' or "; whereSql = whereSql + " so.department_code='" + s + "' or ";
} }
} }
} }
whereSql=whereSql+" )"; whereSql = whereSql + " )";
}else{ } else {
whereSql= " so.create_user='-123'";//其实就是为了不查询出数据 whereSql = " so.create_user='-123'";//其实就是为了不查询出数据
} }
} }
return this.baseMapper.queryPlanningAll(loginUserOrgCode,whereSql); return this.baseMapper.queryPlanningAll(loginUserOrgCode, whereSql);
} }
/** /**
*根据项目id 查询 项目实施策划的项目 * 根据项目id 查询 项目实施策划的项目
*
* @param projectId * @param projectId
* @return * @return
*/ */
public BusPlanning getByProJectId(String projectId){ public BusPlanning getByProJectId(String projectId) {
return this.baseMapper.getByProJectId(projectId); return this.baseMapper.getByProJectId(projectId);
} }
} }

View File

@ -7,7 +7,7 @@ import java.io.Serializable;
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
public class ProjectAccount implements Serializable { public class ProjectAccount implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**部门code*/ /**部门code*/
private String departmentCode; private String departmentCode;

View File

@ -70,6 +70,7 @@
and ${whereSql} and ${whereSql}
</if> </if>
</where> </where>
order by itemNo asc
</select> </select>
<!--根据合同id 查询 合同节点明细--> <!--根据合同id 查询 合同节点明细-->