动火安全措施确认

pull/4/head
fangjiakai 2024-01-24 17:20:55 +08:00
parent eb6ea22dfd
commit f43b48d546
7 changed files with 61 additions and 2 deletions

View File

@ -125,6 +125,19 @@ public class AppHotworkController extends BaseController {
return map;
}
@RequestMapping("/listSignFinished")
@ResponseBody
public Object listSignFinished() throws Exception {
Map<String,Object> map = new HashMap<>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData signs = hotworkService.listSignFinished(pd);
map.put("result",errInfo);
map.put("signs",signs);
return map;
}
@RequestMapping("/cancel")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "动火作业",instructionsOperate = "动火作业",instructionsType = "打回")

View File

@ -28,6 +28,8 @@ public interface HotworkSignMapper {
*/
List<PageData> listById(PageData pd);
List<PageData> listAll(PageData sign);
/**ID
* @throws Exception
*/

View File

@ -26,6 +26,8 @@ public interface HotworkService {
PageData findById(PageData pd) throws Exception;
PageData listSignFinished(PageData pd) throws Exception;
PageData checkWorkCount(PageData pd);
//获取所有措施(bus_hotwork_measures)

View File

@ -169,6 +169,32 @@ public class HotworkServiceImpl implements HotworkService {
return pageData;
}
@Override
public PageData listSignFinished(PageData pd) throws Exception {
Map<String,List<PageData>> rmap = new HashMap<>();
List<PageData> varList = hotworkSignMapper.listAll(pd);
if (varList != null && !varList.isEmpty()) {
varList.stream().forEach(item -> {
PageData sign = new PageData();
sign.put("SIGN_PATH", item.getString("SIGN_PATH").split(","));
sign.put("SIGN_TIME", item.getString("SIGN_TIME").split(","));
sign.put("DESCR", item.getString("DESCR") != null ? item.getString("DESCR") : "无");
if(rmap.containsKey(item.getString("CODE"))){
rmap.get(item.getString("CODE")).add(sign);
}else{
List<PageData> signs = new ArrayList<>();
signs.add(sign);
rmap.put(item.getString("CODE"),signs);
}
});
}
PageData rpd = new PageData();
if (rmap != null && !rmap.isEmpty()) {
rpd.putAll(rmap);
}
return rpd;
}
@Override
public PageData checkWorkCount(PageData pd) {
PageData rpd = new PageData();

View File

@ -454,7 +454,7 @@
left join oa_department as endo on f.WORK_END_DEPARTMENT_ID = endo.DEPARTMENT_ID
left join sys_user as endu on f.WORK_END_USER_ID = endu.USER_ID
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 where log.STATUS != -1 having 1 order by log.ACT_TIME desc
) tmp group by tmp.WORK_ID) log on log.WORK_ID = f.HOTWORK_ID
where f.ISDELETE = '0'
<if test="pd.STEP_NAME != null and pd.STEP_NAME != ''"><!-- 关键词检索 -->

View File

@ -100,6 +100,19 @@
order by f.SIGN_TIME desc
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>,
step.CODE
from
<include refid="tableName"></include> f
left join bus_eightwork_step step on step.STEP_ID = f.STEP_ID
where
f.HOTWORK_ID = #{HOTWORK_ID}
and
f.SIGN_TIME is not null
</select>
<select id="checkUnsigned" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>

View File

@ -24,6 +24,7 @@
f.HOTWORKTOMEASURES_ID,
f.CONFIRM_ID,
f.SIGN_PATH,
f.SIGN_TIME,
f.IMG_PATH
</sql>
@ -157,9 +158,11 @@
<select id="listSignFinishMeasures" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
<include refid="Field"></include>,
m.*
from
<include refid="tableName"></include> f
left join bus_hotwork_measures m on f.BUS_HOTWORK_MEASURES_ID = m.BUS_HOTWORK_MEASURES_ID
where
f.HOTWORK_ID = #{HOTWORK_ID}
</select>