forked from integrated_whb/integrated_whb
Merge remote-tracking branch 'origin/dev' into dev
commit
3a0afb43ef
|
@ -39,7 +39,7 @@ public class CustomStopController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CustomService customService;
|
private CustomService customService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ListCheckItemService listcheckitemService;
|
private CustomItemService customItemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private DepartmentService departmentService;
|
private DepartmentService departmentService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -105,7 +105,7 @@ public class CustomStopController extends BaseController {
|
||||||
itme.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
itme.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
||||||
itme.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
itme.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
||||||
itme.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
itme.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
listcheckitemService.save(itme);
|
customItemService.save(itme);
|
||||||
set.add(json.get("RISKPOINT_ID").toString());
|
set.add(json.get("RISKPOINT_ID").toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -385,127 +385,6 @@ public class CustomStopController extends BaseController {
|
||||||
map.put("result", errInfo); //返回结果
|
map.put("result", errInfo); //返回结果
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
/**启用
|
|
||||||
* @param out
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@RequestMapping(value="/enable")
|
|
||||||
// @RequiresPermissions("customstop:del")
|
|
||||||
@ResponseBody
|
|
||||||
@LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "启用")
|
|
||||||
public Object enable() throws Exception{
|
|
||||||
Map<String,String> map = new HashMap<String,String>();
|
|
||||||
String errInfo = "success";
|
|
||||||
PageData pd = new PageData();
|
|
||||||
pd = this.getPageData();
|
|
||||||
pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
|
||||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
|
||||||
customService.enable(pd);
|
|
||||||
pd = customService.findById(pd);
|
|
||||||
// 启用清单时,修改禁用清单时间段的结束时间
|
|
||||||
PageData disPd = new PageData();
|
|
||||||
disPd.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
|
|
||||||
disPd.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
|
|
||||||
disPd = listdisabletimeService.findByList(pd);
|
|
||||||
disPd.put("ENDTIME", DateUtil.date2Str(new Date()));
|
|
||||||
disPd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
|
||||||
disPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
|
||||||
listdisabletimeService.editEndTime(disPd);
|
|
||||||
// 修改清单统计
|
|
||||||
if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
|
|
||||||
if("listType0005".equals(pd.get("TYPE").toString())) {
|
|
||||||
pd.put("LISTSTATISTICS_ID", this.get32UUID()); //主键
|
|
||||||
pd.put("STARTTIME", pd.get("START_DATE").toString()+" 00:00:00");
|
|
||||||
pd.put("ENDTIME", pd.get("END_DATE").toString()+" 23:59:59");
|
|
||||||
pd.put("PERIOD", null);
|
|
||||||
PageData statistics = listStatisticsService.findByCondition(pd);
|
|
||||||
if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
|
||||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+2);
|
|
||||||
listStatisticsService.edit(statistics);
|
|
||||||
}
|
|
||||||
pd.put("ISSTATISTICS", '1');
|
|
||||||
// 本期已检查的不计入统计
|
|
||||||
checkrecordService.editStatistics(pd);
|
|
||||||
} else {
|
|
||||||
if(pd.get("PERIOD") != null && Tools.notEmpty(pd.get("PERIOD").toString())) {
|
|
||||||
String period = pd.get("PERIOD").toString();
|
|
||||||
switch (period) {
|
|
||||||
case "checkPeriod0001"://每日
|
|
||||||
pd.put("STARTTIME", DateUtil.getDay()+" 00:00:00");
|
|
||||||
pd.put("ENDTIME", DateUtil.getDay()+" 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0002"://每周
|
|
||||||
pd.put("STARTTIME", DateUtil.getWeekStart());
|
|
||||||
pd.put("ENDTIME", DateUtil.getWeekEnd());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0003"://每旬
|
|
||||||
String year = DateUtil.getYear().toString();
|
|
||||||
String month = DateUtil.getMonth().toString();
|
|
||||||
Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
|
|
||||||
String startTime = year + "-" + month + "-";
|
|
||||||
String endTime = year + "-" + month + "-";
|
|
||||||
if(day <= 10) {
|
|
||||||
startTime = startTime+"01 00:00:00";
|
|
||||||
endTime = endTime+"10 23:59:59";
|
|
||||||
} else if(day > 10 && day <= 20) {
|
|
||||||
startTime = startTime+"11 00:00:00";
|
|
||||||
endTime = endTime+"20 23:59:59";
|
|
||||||
} else {
|
|
||||||
startTime = startTime+"21 00:00:00";
|
|
||||||
endTime = DateUtil.getMonthEndDay()+" 23:59:59";
|
|
||||||
}
|
|
||||||
pd.put("STARTTIME", startTime);
|
|
||||||
pd.put("ENDTIME", endTime);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0004"://每月
|
|
||||||
pd.put("STARTTIME", DateUtil.getMonthFirstDay()+" 00:00:00");
|
|
||||||
pd.put("ENDTIME", DateUtil.getMonthEndDay()+" 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0005"://每季
|
|
||||||
pd.put("STARTTIME", DateUtil.quarterStart()+" 00:00:00");
|
|
||||||
pd.put("ENDTIME", DateUtil.quarterEnd()+" 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0006"://每年
|
|
||||||
pd.put("STARTTIME", DateUtil.getCurrYearFirst()+" 00:00:00");
|
|
||||||
pd.put("ENDTIME", DateUtil.getCurrYearLast()+" 23:59:59");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "checkPeriod0007"://半年
|
|
||||||
String byear = DateUtil.getYear().toString();
|
|
||||||
Integer bmonth = Integer.parseInt(DateUtil.getMonth().toString());
|
|
||||||
if(bmonth <= 6) {
|
|
||||||
pd.put("STARTTIME", byear+"-01-01 00:00:00");
|
|
||||||
pd.put("ENDTIME", byear+"-06-30 23:59:59");
|
|
||||||
} else if(bmonth > 6) {
|
|
||||||
pd.put("STARTTIME", byear+"-07-01 00:00:00");
|
|
||||||
pd.put("ENDTIME", byear+"-12-31 23:59:59");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PageData statistics = listStatisticsService.findByCondition(pd);
|
|
||||||
if(statistics != null && statistics.get("LISTSTATISTICS_ID") != null) {
|
|
||||||
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+1);
|
|
||||||
listStatisticsService.edit(statistics);
|
|
||||||
}
|
|
||||||
|
|
||||||
pd.put("ISSTATISTICS", '1');
|
|
||||||
// 本期已检查的不计入统计
|
|
||||||
checkrecordService.editStatistics(pd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 将本频率内已检查的记录,改为不计入
|
|
||||||
map.put("result", errInfo); //返回结果
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**修改
|
/**修改
|
||||||
* @param
|
* @param
|
||||||
|
@ -527,71 +406,44 @@ public class CustomStopController extends BaseController {
|
||||||
|
|
||||||
PageData pd2 = new PageData(); //删除原有内容
|
PageData pd2 = new PageData(); //删除原有内容
|
||||||
pd2.put("CUSTOM_ID", pd.getString("CUSTOM_ID"));
|
pd2.put("CUSTOM_ID", pd.getString("CUSTOM_ID"));
|
||||||
List<PageData> varList = listcheckitemService.listAll(pd2); //
|
List<PageData> varList = customItemService.listAll(pd2); //
|
||||||
for (PageData pageData : varList) {
|
for (PageData pageData : varList) {
|
||||||
PageData citem = new PageData();
|
PageData citem = new PageData();
|
||||||
citem.put("LISTCHECKITEM_ID", pageData.getString("LISTCHECKITEM_ID"));
|
citem.put("CUSTOM_ITEM_ID", pageData.getString("CUSTOM_ITEM_ID"));
|
||||||
listcheckitemService.delete(citem);
|
customItemService.delete(citem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(pd.get("LISTITEM")!=null && !pd.get("LISTITEM").equals("")) {
|
if(pd.get("LISTITEM")!=null && !pd.get("LISTITEM").equals("")) {
|
||||||
Set<String> set = new HashSet<String>();//记录所有风险点
|
|
||||||
int acount=0;//重大风险数
|
|
||||||
int bcount=0;//较大风险数
|
|
||||||
int ccount=0;//一般风险数
|
|
||||||
int dcount=0;//低风险数
|
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("LISTITEM").toString());
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("LISTITEM").toString());
|
||||||
for (JSONObject json : list) {
|
for (JSONObject json : list) {
|
||||||
if(json.get("RISKCHECKITEM_ID")!=null && json.get("RISKCHECKITEM_ID")!="" && json.get("RISKPOINT_ID")!=null && json.get("RISKPOINT_ID")!="") {
|
|
||||||
PageData itme = new PageData();
|
PageData itme = new PageData();
|
||||||
itme.put("LISTCHECKITEM_ID", this.get32UUID()); //主键
|
itme.put("CUSTOM_ITEM_ID", this.get32UUID()); //主键
|
||||||
itme.put("RISKCHECKITEM_ID", json.get("RISKCHECKITEM_ID"));
|
itme.put("CHECK_CATEGORY", json.get("CHECK_CATEGORY"));
|
||||||
itme.put("RISKPOINT_ID",json.get("RISKPOINT_ID"));
|
itme.put("CHECK_ITEM",json.get("CHECK_ITEM"));
|
||||||
|
itme.put("CHECK_CONTENT",json.get("CHECK_CONTENT"));
|
||||||
|
itme.put("CHECK_STANDARD",json.get("CHECK_STANDARD"));
|
||||||
|
itme.put("REFERENCE_BASIS",json.get("REFERENCE_BASIS"));
|
||||||
|
itme.put("CHECK_QUALIFIED",json.get("CHECK_QUALIFIED"));
|
||||||
|
itme.put("CHECK_UNQUALIFIED",json.get("CHECK_UNQUALIFIED"));
|
||||||
|
itme.put("OPERATION_TYPE",json.get("OPERATION_TYPE"));
|
||||||
itme.put("CUSTOM_ID",pd.get("CUSTOM_ID"));
|
itme.put("CUSTOM_ID",pd.get("CUSTOM_ID"));
|
||||||
|
itme.put("COMMON_ITEM_SORT", 1);
|
||||||
|
itme.put("COMMON_ID", json.get("COMMON_ID") == null ? "" : json.get("COMMON_ID"));
|
||||||
|
itme.put("COMMON_ITEM_ID", json.get("COMMON_ITEM_ID") == null ? "" : json.get("COMMON_ITEM_ID"));
|
||||||
itme.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
itme.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||||
itme.put("ISDELETE", "0"); //是否删除
|
itme.put("ISDELETE", "0"); //是否删除
|
||||||
itme.put("CREATOR", Jurisdiction.getUsername()); //添加人
|
itme.put("CREATOR_ID", Jurisdiction.getUSER_ID()); //添加人id
|
||||||
itme.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间
|
itme.put("CREATOR_NAME", Jurisdiction.getUsername()); //添加人
|
||||||
itme.put("OPERATOR", Jurisdiction.getUsername()); //修改人
|
itme.put("CREATE_TIME", DateUtil.date2Str(new Date())); //创建时间
|
||||||
itme.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
|
itme.put("OPERATOR_ID", Jurisdiction.getUSER_ID()); //修改人
|
||||||
listcheckitemService.save(itme);
|
itme.put("OPERATOR_NAME", Jurisdiction.getUsername()); //修改时间
|
||||||
set.add(json.get("RISKPOINT_ID").toString());
|
itme.put("OPERATE_TIME", DateUtil.date2Str(new Date())); //修改时间
|
||||||
}
|
itme.put("DELETEOR_ID", Jurisdiction.getUSER_ID()); //添加人id
|
||||||
}
|
itme.put("DELETEOR_NAME", Jurisdiction.getUsername()); //添加人
|
||||||
for (String str : set) {
|
itme.put("DELETE_TIME", DateUtil.date2Str(new Date())); //删除时间
|
||||||
PageData rpd= new PageData();
|
customItemService.save(itme);
|
||||||
rpd.put("RISKPOINT_ID", str);
|
|
||||||
rpd=this.riskpointService.findById(rpd);
|
|
||||||
if(rpd.getString("LEVELID").equals("levelA")) {
|
|
||||||
acount++;
|
|
||||||
}else if(rpd.getString("LEVELID").equals("levelB")) {
|
|
||||||
bcount++;
|
|
||||||
}else if(rpd.getString("LEVELID").equals("levelC")) {
|
|
||||||
ccount++;
|
|
||||||
}else if(rpd.getString("LEVELID").equals("levelD")) {
|
|
||||||
dcount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pd.put("ACOUNT", acount);
|
|
||||||
pd.put("BCOUNT", bcount);
|
|
||||||
pd.put("CCOUNT", ccount);
|
|
||||||
pd.put("DCOUNT", dcount);
|
|
||||||
}
|
|
||||||
|
|
||||||
//巡检路线
|
|
||||||
checkRouteService.delete(pd2);
|
|
||||||
List<JSONObject> routes = (List<JSONObject>) JSON.parse(pd.get("ROUTE").toString());
|
|
||||||
for (int j = 0; j < routes.size() ; j++) {
|
|
||||||
JSONObject json = routes.get(j);
|
|
||||||
if(json.get("ID")!=null && json.get("ID")!="") {
|
|
||||||
PageData route = new PageData();
|
|
||||||
route.put("CHECKROUTE_ID", this.get32UUID()); //主键
|
|
||||||
route.put("CUSTOM_ID",pd.get("CUSTOM_ID"));
|
|
||||||
route.put("IDENTIFICATIONPARTS_ID", json.get("ID"));
|
|
||||||
route.put("ORDERBY",j);
|
|
||||||
checkRouteService.save(route);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
customService.edit(pd); // 修改清单管理的内容
|
customService.edit(pd); // 修改清单管理的内容
|
||||||
|
@ -971,17 +823,14 @@ public class CustomStopController extends BaseController {
|
||||||
if (Tools.notEmpty(KEYWORDS))
|
if (Tools.notEmpty(KEYWORDS))
|
||||||
pd.put("KEYWORDS", KEYWORDS.trim());
|
pd.put("KEYWORDS", KEYWORDS.trim());
|
||||||
|
|
||||||
System.out.println(pd.getString("KEYWORDS"));
|
List<PageData> varList = customItemService.listAll(pd);
|
||||||
List<PageData> varList = listcheckitemService.listAll(pd);
|
|
||||||
pd = customService.findById(pd); //根据ID读取
|
pd = customService.findById(pd); //根据ID读取
|
||||||
|
|
||||||
for (PageData item : varList) {
|
for (PageData item : varList) {
|
||||||
item.put("RECORDITEM_ID", this.get32UUID()); //主键
|
item.put("RECORDITEM_ID", this.get32UUID()); //主键
|
||||||
}
|
}
|
||||||
List<PageData> ideList = identificationPartsService.listAllByList(pd);
|
|
||||||
|
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("ideList", ideList);
|
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
|
@ -1152,7 +1001,7 @@ public class CustomStopController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**列表
|
/**列表
|
||||||
* @param page
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value="/checkListIndex")
|
@RequestMapping(value="/checkListIndex")
|
||||||
|
|
|
@ -144,14 +144,13 @@ public class HotworkServiceImpl implements HotworkService {
|
||||||
|
|
||||||
List<PageData> unsignedList = hotworkSignMapper.checkUnsigned(sign);//当前步骤未签名人列表
|
List<PageData> unsignedList = hotworkSignMapper.checkUnsigned(sign);//当前步骤未签名人列表
|
||||||
if((unsignedList == null || unsignedList.size() == 0) && pd.getString("APPLY_STATUS").equals("1")){//如果没有未签人 则跳转下一步
|
if((unsignedList == null || unsignedList.size() == 0) && pd.getString("APPLY_STATUS").equals("1")){//如果没有未签人 则跳转下一步
|
||||||
// PageData currentflow = getStep(work.get("TASK_ID"), work.get("STEP_ID"));
|
|
||||||
hotworkMapper.editStep(work);
|
|
||||||
|
|
||||||
PageData currentflow = getCurrentFlow(work);
|
|
||||||
|
|
||||||
//保存日志
|
//保存日志
|
||||||
saveLog(work,work.getString("USER_ID"),"1");
|
saveLog(work,work.getString("USER_ID"),"1");
|
||||||
|
|
||||||
|
PageData currentflow = getCurrentFlow(work);
|
||||||
|
work.put("STEP_ID", currentflow.get("STEP_ID"));
|
||||||
|
hotworkMapper.editStep(work);
|
||||||
|
|
||||||
if("99".equals(currentflow.getString("NEXT_STEP_ID"))){
|
if("99".equals(currentflow.getString("NEXT_STEP_ID"))){
|
||||||
eightworkvideomanagerMapper.editStatus(work);
|
eightworkvideomanagerMapper.editStatus(work);
|
||||||
return;
|
return;
|
||||||
|
@ -385,7 +384,7 @@ public class HotworkServiceImpl implements HotworkService {
|
||||||
flow.put("TASK_ID", work.get("TASK_ID"));
|
flow.put("TASK_ID", work.get("TASK_ID"));
|
||||||
flow.put("STEP_ID", work.get("STEP_ID"));
|
flow.put("STEP_ID", work.get("STEP_ID"));
|
||||||
flow = eightWorkTaskFlowMapper.getStep(flow);
|
flow = eightWorkTaskFlowMapper.getStep(flow);
|
||||||
if("1".equals(flow.get("CAN_SKIP")) && (work.get(flow.get("NEXT_ACTOR_FIELD")) == null || work.get(flow.get("NEXT_ACTOR_FIELD")).equals(""))){
|
if("1".equals(flow.getString("CAN_SKIP")) && (work.get(flow.get("NEXT_ACTOR_FIELD")) == null || work.get(flow.get("NEXT_ACTOR_FIELD")).equals(""))){
|
||||||
work.put("STEP_ID", flow.get("NEXT_STEP_ID"));
|
work.put("STEP_ID", flow.get("NEXT_STEP_ID"));
|
||||||
return getCurrentFlow(work);
|
return getCurrentFlow(work);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -434,8 +434,8 @@
|
||||||
endo.`NAME` as WORK_END_DEPARTMENT_NAME,
|
endo.`NAME` as WORK_END_DEPARTMENT_NAME,
|
||||||
endu.`NAME` as WORK_END_USER_NAME,
|
endu.`NAME` as WORK_END_USER_NAME,
|
||||||
log.STEP_NAME,
|
log.STEP_NAME,
|
||||||
log.NEXT_STEP_ID,
|
flow.NEXT_STEP_ID,
|
||||||
log.NEXT_STEP_NAME,
|
n.STEP_NAME as NEXT_STEP_NAME,
|
||||||
log.STATUS
|
log.STATUS
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
|
@ -480,6 +480,9 @@
|
||||||
|
|
||||||
left join (select * from(select * from vi_eightwork_flow_log log having 1 order by log.ACT_TIME desc
|
left join (select * from(select * from vi_eightwork_flow_log log having 1 order by log.ACT_TIME desc
|
||||||
) tmp group by tmp.WORK_ID) log on log.WORK_ID = f.HOTWORK_ID
|
) tmp group by tmp.WORK_ID) log on log.WORK_ID = f.HOTWORK_ID
|
||||||
|
|
||||||
|
left join bus_eightwork_task_flow flow on flow.STEP_ID = f.STEP_ID and flow.TASK_ID = log.TASK_ID
|
||||||
|
left join bus_eightwork_step n on n.STEP_ID = flow.NEXT_STEP_ID
|
||||||
where f.ISDELETE = '0'
|
where f.ISDELETE = '0'
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
and f.CHECK_NO LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
and f.CHECK_NO LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||||
|
|
Loading…
Reference in New Issue