安全风险清单更改,台账排序优化
This commit is contained in:
parent
ccaf0dbeae
commit
3a2a9e1740
|
@ -47,6 +47,9 @@ public class BusPlanning implements Serializable {
|
|||
@Excel(name = "部门code", width = 15)
|
||||
@ApiModelProperty(value = "部门code")
|
||||
private String departmentCode;
|
||||
/**风险安全清单*/
|
||||
@ApiModelProperty(value = "风险安全清单")
|
||||
private String busAqfxqd;
|
||||
/**创建人*/
|
||||
@Excel(name = "创建人", width = 15)
|
||||
@ApiModelProperty(value = "创建人")
|
||||
|
|
|
@ -83,4 +83,7 @@ public class BusPlanningMain implements Serializable {
|
|||
|
||||
private List<BusAqfxqd> busAqfxqdList;
|
||||
|
||||
/**风险安全清单*/
|
||||
private String busAqfxqd;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,40 +34,43 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
private BusAqfxqdMapper busAqfxqdMapper;
|
||||
@Autowired
|
||||
private BusImplementZybzchMapper busImplementZybzchMapper;
|
||||
|
||||
/**
|
||||
* 项目实施策划分页
|
||||
*
|
||||
* @param page
|
||||
* @param busPlanning
|
||||
* @return
|
||||
*/
|
||||
public Page<BusPlanningQuery> pageByParams(Page<BusPlanningQuery> page, BusPlanningQuery busPlanning){
|
||||
public Page<BusPlanningQuery> pageByParams(Page<BusPlanningQuery> page, BusPlanningQuery busPlanning) {
|
||||
LoginUser loginUser = LoginUtil.getLoginUser();
|
||||
String whereSql="";
|
||||
if("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))){
|
||||
whereSql=" p.create_user='"+loginUser.getId()+"'";
|
||||
}else{
|
||||
String whereSql = "";
|
||||
if ("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))) {
|
||||
whereSql = " p.create_user='" + loginUser.getId() + "'";
|
||||
} else {
|
||||
List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId());
|
||||
if(list!=null&&list.size()>0){
|
||||
whereSql=" (";
|
||||
String s ="";
|
||||
if (list != null && list.size() > 0) {
|
||||
whereSql = " (";
|
||||
String s = "";
|
||||
int size = list.size();
|
||||
for(int k=0;k<size;k++){
|
||||
for (int k = 0; k < size; k++) {
|
||||
s = StringUtils.strTrim(list.get(k));
|
||||
if(!"".equals(s)){
|
||||
if(k==(size-1)){
|
||||
whereSql=whereSql+" p.department_code='"+s+"'";
|
||||
}else{
|
||||
whereSql=whereSql+" p.department_code='"+s+"' or ";
|
||||
if (!"".equals(s)) {
|
||||
if (k == (size - 1)) {
|
||||
whereSql = whereSql + " p.department_code='" + s + "'";
|
||||
} else {
|
||||
whereSql = whereSql + " p.department_code='" + s + "' or ";
|
||||
}
|
||||
}
|
||||
}
|
||||
whereSql=whereSql+" )";
|
||||
}else{
|
||||
whereSql= " p.create_user='-123'";//其实就是为了不查询出数据
|
||||
whereSql = whereSql + " )";
|
||||
} else {
|
||||
whereSql = " p.create_user='-123'";//其实就是为了不查询出数据
|
||||
}
|
||||
}
|
||||
return this.baseMapper.pageByParams(page,busPlanning,whereSql);
|
||||
return this.baseMapper.pageByParams(page, busPlanning, whereSql);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IBusUserResponsibleDepartmentService userResponsibleDepartmentService;
|
||||
|
||||
|
@ -97,19 +100,21 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
|
||||
/**
|
||||
* 主副表存值 更新
|
||||
*
|
||||
* @param busPlanningMain
|
||||
*/
|
||||
public void updateBusPlanningMainById(BusPlanningMain busPlanningMain){
|
||||
BusPlanning busPlanning=new BusPlanning();
|
||||
public void updateBusPlanningMainById(BusPlanningMain busPlanningMain) {
|
||||
BusPlanning busPlanning = new BusPlanning();
|
||||
BeanUtils.copyProperties(busPlanningMain, busPlanning);
|
||||
this.baseMapper.updateById(busPlanning);
|
||||
String projectId = busPlanningMain.getProjectId();
|
||||
BusProductService byId = busProductServiceMapper.selectById(projectId);
|
||||
this.deleteSon(projectId,busPlanningMain.getId());
|
||||
this.deleteSon(projectId, busPlanningMain.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);
|
||||
busQualityPlanningMapper.deleteByProjectId(projectId);
|
||||
busRiskAnalysisMapper.deleteByProjectId(projectId);
|
||||
|
@ -124,12 +129,14 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
busAqfxqdMapper.deleteByProjectId(projectId);
|
||||
busImplementZybzchMapper.deleteByProjectId(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 主副表存值
|
||||
*
|
||||
* @param busPlanningMain
|
||||
*/
|
||||
public BusPlanning saveMain(BusPlanningMain busPlanningMain){
|
||||
BusPlanning busPlanning=new BusPlanning();
|
||||
public BusPlanning saveMain(BusPlanningMain busPlanningMain) {
|
||||
BusPlanning busPlanning = new BusPlanning();
|
||||
BeanUtils.copyProperties(busPlanningMain, busPlanning);
|
||||
this.baseMapper.insert(busPlanning);
|
||||
String projectId = busPlanningMain.getProjectId();
|
||||
|
@ -138,15 +145,15 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
byId.setProposalFinsh(1);
|
||||
busProductServiceMapper.updateById(byId);
|
||||
busPlanningMain.setId(busPlanning.getId());
|
||||
this.insertBase(projectId,busPlanningMain,byId);
|
||||
this.insertBase(projectId, busPlanningMain, byId);
|
||||
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 taskBearingDepartment = byId.getTaskBearingDepartment();
|
||||
/**实施目标*/
|
||||
BusImplementGoals busImplementGoals=new BusImplementGoals();
|
||||
BusImplementGoals busImplementGoals = new BusImplementGoals();
|
||||
busImplementGoals.setProjectId(projectId);
|
||||
busImplementGoals.setImplementGoals(busPlanningMain.getImplementGoals());
|
||||
busImplementGoals.setDepartmentCode(taskBearingDepartment);
|
||||
|
@ -155,7 +162,7 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
busImplementGoalsMapper.insert(busImplementGoals);
|
||||
|
||||
/**质量策划*/
|
||||
BusQualityPlanning busQualityPlanning=new BusQualityPlanning();
|
||||
BusQualityPlanning busQualityPlanning = new BusQualityPlanning();
|
||||
busQualityPlanning.setProjectId(projectId);
|
||||
busQualityPlanning.setQualityPlanning(busPlanningMain.getQualityPlanning());
|
||||
busQualityPlanning.setDepartmentCode(taskBearingDepartment);
|
||||
|
@ -163,7 +170,7 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
busQualityPlanning.setCreateUser(LoginUtil.getLoginUserId());
|
||||
busQualityPlanningMapper.insert(busQualityPlanning);
|
||||
/**风险分析识别与管理策划*/
|
||||
BusRiskAnalysis busRiskAnalysis=new BusRiskAnalysis();
|
||||
BusRiskAnalysis busRiskAnalysis = new BusRiskAnalysis();
|
||||
busRiskAnalysis.setProjectId(projectId);
|
||||
busRiskAnalysis.setRiskAnalysis(busPlanningMain.getRiskAnalysis());
|
||||
busRiskAnalysis.setDepartmentCode(taskBearingDepartment);
|
||||
|
@ -174,10 +181,10 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
* 任务分解与分工
|
||||
*/
|
||||
List<BusDivisionLabour> busDivisionLabourList = busPlanningMain.getBusDivisionLabourList();
|
||||
if(busDivisionLabourList!=null&&busDivisionLabourList.size()>0){
|
||||
BusDivisionLabour busDivisionLabour=null;
|
||||
if (busDivisionLabourList != null && busDivisionLabourList.size() > 0) {
|
||||
BusDivisionLabour busDivisionLabour = null;
|
||||
for (int i = 0; i < busDivisionLabourList.size(); i++) {
|
||||
busDivisionLabour= busDivisionLabourList.get(i);
|
||||
busDivisionLabour = busDivisionLabourList.get(i);
|
||||
busDivisionLabour.setProjectId(projectId);
|
||||
busDivisionLabour.setDepartmentCode(taskBearingDepartment);
|
||||
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();
|
||||
if(busContractAcceptanceList!=null&&busContractAcceptanceList.size()>0){
|
||||
BusContractAcceptance busContractAcceptance =null;
|
||||
if (busContractAcceptanceList != null && busContractAcceptanceList.size() > 0) {
|
||||
BusContractAcceptance busContractAcceptance = null;
|
||||
for (int i = 0; i < busContractAcceptanceList.size(); i++) {
|
||||
busContractAcceptance = busContractAcceptanceList.get(i);
|
||||
busContractAcceptance.setProjectId(projectId);
|
||||
|
@ -204,8 +211,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
* 项目组组成及职责分工
|
||||
*/
|
||||
List<BusDivisionDuties> busDivisionDutiesList = busPlanningMain.getBusDivisionDutiesList();
|
||||
if(busDivisionDutiesList!=null&&busDivisionDutiesList.size()>0){
|
||||
BusDivisionDuties busDivisionDuties =null;
|
||||
if (busDivisionDutiesList != null && busDivisionDutiesList.size() > 0) {
|
||||
BusDivisionDuties busDivisionDuties = null;
|
||||
for (int i = 0; i < busDivisionDutiesList.size(); i++) {
|
||||
busDivisionDuties = busDivisionDutiesList.get(i);
|
||||
busDivisionDuties.setProjectId(projectId);
|
||||
|
@ -219,8 +226,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
* 外部协作策划
|
||||
*/
|
||||
List<BusExternalCollaboration> busExternalCollaborationList = busPlanningMain.getBusExternalCollaborationList();
|
||||
if(busExternalCollaborationList!=null&&busExternalCollaborationList.size()>0){
|
||||
BusExternalCollaboration busExternalCollaboration =null;
|
||||
if (busExternalCollaborationList != null && busExternalCollaborationList.size() > 0) {
|
||||
BusExternalCollaboration busExternalCollaboration = null;
|
||||
for (int i = 0; i < busExternalCollaborationList.size(); i++) {
|
||||
busExternalCollaboration = busExternalCollaborationList.get(i);
|
||||
busExternalCollaboration.setProjectId(projectId);
|
||||
|
@ -236,8 +243,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
* 项目财务策划
|
||||
*/
|
||||
List<BusProjectFinancialPlanning> busProjectFinancialPlanningList = busPlanningMain.getBusProjectFinancialPlanningList();
|
||||
if(busProjectFinancialPlanningList!=null&&busProjectFinancialPlanningList.size()>0){
|
||||
BusProjectFinancialPlanning busProjectFinancialPlanning =null;
|
||||
if (busProjectFinancialPlanningList != null && busProjectFinancialPlanningList.size() > 0) {
|
||||
BusProjectFinancialPlanning busProjectFinancialPlanning = null;
|
||||
for (int i = 0; i < busProjectFinancialPlanningList.size(); i++) {
|
||||
busProjectFinancialPlanning = busProjectFinancialPlanningList.get(i);
|
||||
busProjectFinancialPlanning.setProjectId(projectId);
|
||||
|
@ -252,8 +259,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
* 项目外协支出策划
|
||||
*/
|
||||
List<BusProjectOutsourcingExpenditurePlanning> busProjectOutsourcingExpenditurePlanningList = busPlanningMain.getBusProjectOutsourcingExpenditurePlanningList();
|
||||
if(busProjectOutsourcingExpenditurePlanningList!=null&&busProjectOutsourcingExpenditurePlanningList.size()>0){
|
||||
BusProjectOutsourcingExpenditurePlanning busProjectOutsourcingExpenditurePlanning =null;
|
||||
if (busProjectOutsourcingExpenditurePlanningList != null && busProjectOutsourcingExpenditurePlanningList.size() > 0) {
|
||||
BusProjectOutsourcingExpenditurePlanning busProjectOutsourcingExpenditurePlanning = null;
|
||||
for (int i = 0; i < busProjectOutsourcingExpenditurePlanningList.size(); i++) {
|
||||
busProjectOutsourcingExpenditurePlanning = busProjectOutsourcingExpenditurePlanningList.get(i);
|
||||
busProjectOutsourcingExpenditurePlanning.setProjectId(projectId);
|
||||
|
@ -266,8 +273,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
}
|
||||
|
||||
List<BusContractGjch> busContractGjchList = busPlanningMain.getBusContractGjchList();
|
||||
if(busContractGjchList!=null&&busContractGjchList.size()>0){
|
||||
BusContractGjch busContractGjch =null;
|
||||
if (busContractGjchList != null && busContractGjchList.size() > 0) {
|
||||
BusContractGjch busContractGjch = null;
|
||||
for (int i = 0; i < busContractGjchList.size(); i++) {
|
||||
busContractGjch = busContractGjchList.get(i);
|
||||
busContractGjch.setProjectId(projectId);
|
||||
|
@ -279,8 +286,8 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
}
|
||||
|
||||
List<BusContractZscq> busContractZscqList = busPlanningMain.getBusContractZscqList();
|
||||
if(busContractZscqList!=null&&busContractZscqList.size()>0){
|
||||
BusContractZscq busContractZscq =null;
|
||||
if (busContractZscqList != null && busContractZscqList.size() > 0) {
|
||||
BusContractZscq busContractZscq = null;
|
||||
for (int i = 0; i < busContractZscqList.size(); i++) {
|
||||
busContractZscq = busContractZscqList.get(i);
|
||||
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){
|
||||
BusAqfxqd busAqfxqd =null;
|
||||
for (int i = 0; i < busAqfxqdList.size(); i++) {
|
||||
|
@ -303,12 +310,10 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
busAqfxqd.setCreateUser(LoginUtil.getLoginUserId());
|
||||
busAqfxqdMapper.insert(busAqfxqd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
|
||||
/**实施目标*/
|
||||
BusImplementZybzch busImplementZybzch=new BusImplementZybzch();
|
||||
BusImplementZybzch busImplementZybzch = new BusImplementZybzch();
|
||||
busImplementZybzch.setProjectId(projectId);
|
||||
busImplementZybzch.setZybzch(busPlanningMain.getZybzch());
|
||||
busImplementZybzch.setDepartmentCode(taskBearingDepartment);
|
||||
|
@ -319,83 +324,90 @@ public class BusPlanningServiceImpl extends ServiceImpl<BusPlanningMapper, BusPl
|
|||
|
||||
/**
|
||||
* 删除子表
|
||||
*
|
||||
* @param projectId
|
||||
*/
|
||||
public void removeSonByProject(String projectId,String id){
|
||||
this.deleteSon(projectId,id);
|
||||
public void removeSonByProject(String projectId, String id) {
|
||||
this.deleteSon(projectId, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目实施策划 查询是否可更改 为0 的值
|
||||
*
|
||||
* @param loginUserOrgCode
|
||||
* @return
|
||||
*/
|
||||
public List<Map> queryPlanning(String loginUserOrgCode){
|
||||
public List<Map> queryPlanning(String loginUserOrgCode) {
|
||||
LoginUser loginUser = LoginUtil.getLoginUser();
|
||||
String whereSql="";
|
||||
if("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))){
|
||||
whereSql=" so.create_user='"+loginUser.getId()+"'";
|
||||
}else{
|
||||
String whereSql = "";
|
||||
if ("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))) {
|
||||
whereSql = " so.create_user='" + loginUser.getId() + "'";
|
||||
} else {
|
||||
List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId());
|
||||
if(list!=null&&list.size()>0){
|
||||
whereSql=" (";
|
||||
String s ="";
|
||||
if (list != null && list.size() > 0) {
|
||||
whereSql = " (";
|
||||
String s = "";
|
||||
int size = list.size();
|
||||
for(int k=0;k<size;k++){
|
||||
for (int k = 0; k < size; k++) {
|
||||
s = StringUtils.strTrim(list.get(k));
|
||||
if(!"".equals(s)){
|
||||
if(k==(size-1)){
|
||||
whereSql=whereSql+" so.department_code='"+s+"'";
|
||||
}else{
|
||||
whereSql=whereSql+" so.department_code='"+s+"' or ";
|
||||
if (!"".equals(s)) {
|
||||
if (k == (size - 1)) {
|
||||
whereSql = whereSql + " so.department_code='" + s + "'";
|
||||
} else {
|
||||
whereSql = whereSql + " so.department_code='" + s + "' or ";
|
||||
}
|
||||
}
|
||||
}
|
||||
whereSql=whereSql+" )";
|
||||
}else{
|
||||
whereSql= " so.create_user='-123'";//其实就是为了不查询出数据
|
||||
whereSql = whereSql + " )";
|
||||
} else {
|
||||
whereSql = " so.create_user='-123'";//其实就是为了不查询出数据
|
||||
}
|
||||
}
|
||||
return this.baseMapper.queryPlanning(loginUserOrgCode,whereSql);
|
||||
return this.baseMapper.queryPlanning(loginUserOrgCode, whereSql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询 项目实施策划的项目
|
||||
*
|
||||
* @param loginUserOrgCode
|
||||
* @return
|
||||
*/
|
||||
public List<Map> queryPlanningAll(String loginUserOrgCode){
|
||||
public List<Map> queryPlanningAll(String loginUserOrgCode) {
|
||||
LoginUser loginUser = LoginUtil.getLoginUser();
|
||||
String whereSql="";
|
||||
if("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))){
|
||||
whereSql=" so.create_user='"+loginUser.getId()+"'";
|
||||
}else{
|
||||
String whereSql = "";
|
||||
if ("0".equals(StringUtils.strTrim(loginUser.getPositionSelect()))) {
|
||||
whereSql = " so.create_user='" + loginUser.getId() + "'";
|
||||
} else {
|
||||
List<String> list = userResponsibleDepartmentService.queryOrgCodeByUserId(loginUser.getId());
|
||||
if(list!=null&&list.size()>0){
|
||||
whereSql=" (";
|
||||
String s ="";
|
||||
if (list != null && list.size() > 0) {
|
||||
whereSql = " (";
|
||||
String s = "";
|
||||
int size = list.size();
|
||||
for(int k=0;k<size;k++){
|
||||
for (int k = 0; k < size; k++) {
|
||||
s = StringUtils.strTrim(list.get(k));
|
||||
if(!"".equals(s)){
|
||||
if(k==(size-1)){
|
||||
whereSql=whereSql+" so.department_code='"+s+"'";
|
||||
}else{
|
||||
whereSql=whereSql+" so.department_code='"+s+"' or ";
|
||||
if (!"".equals(s)) {
|
||||
if (k == (size - 1)) {
|
||||
whereSql = whereSql + " so.department_code='" + s + "'";
|
||||
} else {
|
||||
whereSql = whereSql + " so.department_code='" + s + "' or ";
|
||||
}
|
||||
}
|
||||
}
|
||||
whereSql=whereSql+" )";
|
||||
}else{
|
||||
whereSql= " so.create_user='-123'";//其实就是为了不查询出数据
|
||||
whereSql = whereSql + " )";
|
||||
} else {
|
||||
whereSql = " so.create_user='-123'";//其实就是为了不查询出数据
|
||||
}
|
||||
}
|
||||
return this.baseMapper.queryPlanningAll(loginUserOrgCode,whereSql);
|
||||
return this.baseMapper.queryPlanningAll(loginUserOrgCode, whereSql);
|
||||
}
|
||||
|
||||
/**
|
||||
*根据项目id 查询 项目实施策划的项目
|
||||
* 根据项目id 查询 项目实施策划的项目
|
||||
*
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
public BusPlanning getByProJectId(String projectId){
|
||||
public BusPlanning getByProJectId(String projectId) {
|
||||
return this.baseMapper.getByProJectId(projectId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
and ${whereSql}
|
||||
</if>
|
||||
</where>
|
||||
order by itemNo asc
|
||||
</select>
|
||||
|
||||
<!--根据合同id 查询 合同节点明细-->
|
||||
|
|
Loading…
Reference in New Issue
Block a user