Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/main/java/com/zcloud/controller/mapApi/MapController.java
pull/4/head
fangjiakai 2024-02-26 10:35:54 +08:00
commit 6ce8b6669e
18 changed files with 147 additions and 36 deletions

View File

@ -487,7 +487,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
}
// 2、整理特殊数据
// 2、1检查人将检查状态
if ("2,3,4".contains(safety.getString("order"))) {
if ("1,2,3,4".contains(safety.getString("order"))) {
List<PageData> inspectors = inspectorService.listAll(condition);
nodes.stream()
.filter(n -> "1".equals(n.getOrder()))

View File

@ -148,7 +148,7 @@ public class AppEightWorkController extends BaseController {
ReturnMap returnMap = new ReturnMap();
PageData pd = new PageData();
pd = this.getPageData();
JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999);
JSONObject body = PLSUtil.getRyRegionList(pd.getString("CORPINFO_ID"),"",1,99999,0);
if (body != null) {
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);

View File

@ -1969,6 +1969,9 @@ public class HiddenController extends BaseController {
if ("-2".equals(pd.getString("HIDDEN_STATUS"))) {
pd.put("ISCONFIRM", "0"); //
pd.put("CONFIRM_TIME", DateUtil.date2Str(new Date()));
pd.put("CONFIRM_USER", Jurisdiction.getUSER_ID());
pd.put("STATE","1");
pd.put("RECTIFICATIONTYPE","2");
if (list.size() == 0) {
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
} else {

View File

@ -132,6 +132,7 @@ public class AppKeyprojectCheckController extends BaseController {
hidden.put("RECTIFYDESCR", json.getString("RECTIFYDESCR")); //整改描述
hidden.put("RECTIFICATIONDEPT", json.getString("RECTIFICATIONDEPT")); //整改部门
hidden.put("RECTIFICATIONOR", json.getString("RECTIFICATIONOR")); //整改人
hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPE_NAME")); //整改人
hidden.put("CREATOR", pd.getString("CREATOR")); //发现人(隐患责任人)
hidden.put("SOURCE", json.getString("SOURCE")); //隐患来源
hidden.put("STATE", "1"); //隐患状态 100-安全环保检查暂存的隐患流程完转0

View File

@ -35,7 +35,7 @@ public class MapSettingController extends BaseController {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.getLayerList(
Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("KEYWORDS"));
Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("str"));
if (body != null) {
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);
returnMap.put("varList", list);
@ -130,7 +130,9 @@ public class MapSettingController extends BaseController {
@ResponseBody
public ReturnMap getFenceList() throws Exception {
PageData pageData = this.getPageData();
return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("KEYWORDS"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount"))));
return ReturnMap.ok().put("data", PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"),
Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")),
Integer.parseInt(pageData.getString("type"))));
}

View File

@ -97,12 +97,14 @@ public class PositAlarmController extends BaseController {
*/
@RequestMapping(value = "/otherRegion/list")
@ResponseBody
public ReturnMap otherRegionList() throws Exception {
public ReturnMap otherRegionList(Page page) throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("KEYWORDS"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")));
JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(), pageData.getString("str"), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")),Integer.parseInt(pageData.getString("type")));
if (body != null) {
returnMap.putAll(body);
page.setTotalResult(body.getIntValue("total"));
returnMap.put("page", page);
}
return returnMap;
}
@ -253,12 +255,14 @@ public class PositAlarmController extends BaseController {
*/
@RequestMapping(value = "/electronicFence/list")
@ResponseBody
public ReturnMap electronicFenceList() throws Exception {
public ReturnMap electronicFenceList(Page page) throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralList("/region/electronicFence/list", pageData);
if (body != null) {
returnMap.putAll(body);
page.setTotalResult(body.getIntValue("total"));
returnMap.put("page", page);
}
return returnMap;
}
@ -337,6 +341,7 @@ public class PositAlarmController extends BaseController {
JSONArray regions = JSONObject.parseArray(pageData.getString("regions"));
JSONArray regId1 = JSONObject.parseArray(pageData.getString("regId1"));
JSONArray doubles = JSONObject.parseArray(pageData.getString("doubles"));
JSONArray regGatherId = JSONObject.parseArray(pageData.getString("regGatherId"));
pageData.put("eleType", list);
pageData.put("eleDept", eleDept);
pageData.put("eleCrossed", eleCrossed);
@ -344,6 +349,7 @@ public class PositAlarmController extends BaseController {
pageData.put("regId", regId);
pageData.put("regId1", regId1);
pageData.put("doubles", doubles);
pageData.put("regGatherId", regGatherId);
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralPost("/region/electronicFence/", pageData, Jurisdiction.getCORPINFO_ID());
@ -390,4 +396,82 @@ public class PositAlarmController extends BaseController {
}
return returnMap;
}
/*
*
* */
@RequestMapping(value = "/getAlarmRecordList")
@ResponseBody
public ReturnMap getAlarmRecordList(Page page) throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
// /old/gatherAlarms/regAlarmGatherList?pageNum=1&pageSize=10&status=1
JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/regAlarmGatherList", pageData);
if (body != null) {
returnMap.putAll(body);
page.setTotalResult(body.getIntValue("total"));
returnMap.put("page", page);
}
return returnMap;
}
/* 聚集概览 */
/**
* @Description:
* @Author: dearLin
* @Date: 2024/2/26/026 9:20
* @Param: [com.zcloud.entity.Page] [page]
* @Return: com.zcloud.util.ReturnMap
*/
@RequestMapping(value = "/aggregateAlarmTrends")
@ResponseBody
public ReturnMap aggregateAlarmTrends() throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
// /old/gatherAlarms/aggregateAlarmTrends?type=2&time=2023-12-18
JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateAlarmTrends", pageData);
if (body != null) {
returnMap.putAll(body);
}
return returnMap;
}
/**
* @Description:
* @Author: dearLin
* @Date: 2024/2/26/026 9:20
* @Param: [com.zcloud.entity.Page] [page]
* @Return: com.zcloud.util.ReturnMap
*/
@RequestMapping(value = "/aggregateDataStatisticsByGroup")
@ResponseBody
public ReturnMap aggregateDataStatisticsByGroup() throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateDataStatisticsByGroup", pageData);
if (body != null) {
returnMap.putAll(body);
}
return returnMap;
}
/**
* @Description:
* @Author: dearLin
* @Date: 2024/2/26/026 9:20
* @Param: [com.zcloud.entity.Page] [page]
* @Return: com.zcloud.util.ReturnMap
*/
@RequestMapping(value = "/aggregateDataStatistics")
@ResponseBody
public ReturnMap aggregateDataStatistics() throws Exception {
PageData pageData = this.getPageData();
ReturnMap returnMap = new ReturnMap();
JSONObject body = PLSUtil.GeneralList("/old/gatherAlarms/aggregateDataStatistics", pageData);
if (body != null) {
returnMap.putAll(body);
}
return returnMap;
}
}

View File

@ -36,7 +36,7 @@ public class UserCardController extends BaseController {
ReturnMap returnMap = new ReturnMap();
page.setPd(pageData);
JSONObject body = PLSUtil.getUserCardDataList(
Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("KEYWORDS"));
Jurisdiction.getCORPINFO_ID(), Integer.parseInt(pageData.getString("currentPage")), Integer.parseInt(pageData.getString("showCount")), pageData.getString("str"));
if (body != null) {
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);
returnMap.put("varList", list);

View File

@ -237,7 +237,7 @@ public class IdentificationPartsController extends BaseController {
PageData pageData = this.getPageData();
String KEYWORDS = (String) pageData.getOrDefault("KEYWORDS", "");
JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount")));
JSONObject body = PLSUtil.getRyRegionList(Jurisdiction.getCORPINFO_ID(),KEYWORDS,Integer.parseInt(pageData.getString("currentPage")),Integer.parseInt(pageData.getString("showCount")),0);
if (body != null) {
List<JSONObject> list = body.getJSONArray("rows").toJavaList(JSONObject.class);

View File

@ -53,12 +53,21 @@ public class AppImgFilesController extends BaseController {
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
if (files != null && files.length > 0) {
for (int i = 0; i < files.length; i++) {
String suffixName = files[i].getOriginalFilename().substring(files[i].getOriginalFilename().lastIndexOf(".")+1).toLowerCase();
if (!"json".equals(suffixName) && !"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) {
errInfo = "fail";
map.put("result", errInfo);
map.put("msg", "文件格式不正确!");
return map;
}
}
for (int i = 0; i < files.length; i++) {
MultipartFile file = files[i];
// 保存文件
File tempFile = new File(file.getOriginalFilename());
FileUtils.copyInputStreamToFile(file.getInputStream(), tempFile);
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("3")) {//四色图改为json文件,不用判断类型
if(!FileUpload.isImage(tempFile) && !TYPE.equals("2") && !TYPE.equals("3") && !TYPE.equals("102")) {//四色图改为json文件,不用判断类型
map.put("result", "failed");
map.put("exception", "上传图片格式不正确,请重新上传");
return map;
@ -79,7 +88,7 @@ public class AppImgFilesController extends BaseController {
String ffile = DateUtil.getDays();
// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径
// String fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd.put("IMGFILES_ID", this.get32UUID());

View File

@ -51,7 +51,11 @@ public class Node {
case "2":
break;
case "3":
this.text = this.text + "<br>被检查人:" + information.getString("INSPECTED_SITEUSER_NAME") + "<br/>(" + information.getString("INSPECTED_SITEUSER_SIGN_TIME") + ")";
if (StringUtils.isNotBlank(information.getString("INSPECTED_SITEUSER_SIGN_TIME"))) {
this.text = this.text + "<br>被检查人:" + information.getString("INSPECTED_SITEUSER_NAME") + "<br/>(" + information.getString("INSPECTED_SITEUSER_SIGN_TIME") + ")";
} else {
this.text = this.text + "<br>被检查人:" + information.getString("INSPECTED_SITEUSER_NAME");
}
break;
case "4":
break;

View File

@ -302,11 +302,11 @@ public class PLSUtil {
* @Param: [java.lang.String, java.lang.Integer, java.lang.Integer] [keywords, currentPage, showCount]
* @Return: com.alibaba.fastjson.JSONObject
*/
public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords, Integer currentPage, Integer showCount) throws Exception {
public static JSONObject getRyRegionList(String CORPINFO_ID, String keywords, Integer currentPage, Integer showCount,Integer type) throws Exception {
HttpHeaders headers = new HttpHeaders();
String url = "/region/region/list?pageNum=" +
currentPage +
"&pageSize=" + showCount + "&type=0" +
"&pageSize=" + showCount + "&type=" +type+
"&str=";
if (Tools.notEmpty(keywords)) url += keywords;
headers.set("Authorization", getToken(CORPINFO_ID));

View File

@ -1610,8 +1610,8 @@
<select id="listTypeBi" parameterType="pd" resultType="pd">
select count(1) count,d.NAME
from bus_checkrecord f
left join BUS_LISTMANAGER l on f.LISTMANAGER_ID = l.LISTMANAGER_ID
from vi_list_checkrecord_all f
left join vi_list_all l on f.LISTMANAGER_ID = l.LISTMANAGER_ID and f.LIST_TYPE = l.LIST_TYPE
left join sys_dictionaries d on d.BIANMA = l.SCREENTYPE
where f.ISDELETE = '0'
AND f.FINISHED = '1'

View File

@ -1436,16 +1436,18 @@
WHERE
h.ISDELETE = '0'
AND h.CORPINFO_ID = #{CORPINFO_ID}
AND h.state != '0'
<!-- AND h.state != '0' -->
<!-- 不包含安全环保检查的状态 100-安全环保检查暂存的隐患 101.检查已归档,待指派 102.检查已归档,指派中 -2.待确认 -->
AND h.STATE NOT IN ('0','100','101','102','-2')
AND h.HIDDENLEVEL = 'hiddenLevel0001'
AND DATE_FORMAT( h.CREATTIME, '%Y-%m' ) &gt;= #{TIME}
AND DATE_FORMAT( h.CREATTIME, '%Y-%m' ) &lt;= DATE_FORMAT( NOW(), '%Y-%m' )
GROUP BY
DATE_FORMAT( h.CREATTIME, '%Y-%m' )
ORDER BY
DATE_FORMAT( h.CREATTIME, '%Y-%m' )
</if>
<if test="TYPE==2"><!-- 未整改 -->
DATE_FORMAT( h.CREATTIME, '%Y-%m' )
</if>
<if test="TYPE==2"><!-- 未整改 -->
SELECT
count( 1 ) NUMBER,
DATE_FORMAT( h.CREATTIME, '%Y-%m' ) TIME
@ -2555,6 +2557,9 @@
CHECKDEPT = #{CHECKDEPT},
CHECKOR = #{CHECKOR},
HIDDEN_ID = HIDDEN_ID
<if test="RECTIFICATIONTYPE != null and RECTIFICATIONTYPE != ''">
,RECTIFICATIONTYPE = #{RECTIFICATIONTYPE}
</if>
where
HIDDEN_ID = #{HIDDEN_ID}
</update>

View File

@ -65,7 +65,8 @@
f.FINAL_CHECKDESCR,
f.ISRELEVANT,
f.ISPUNISH,
f.POSITIONDESC
f.POSITIONDESC,
f.HIDDENTYPE_NAME
</sql>
<!-- 字段用于新增 -->
@ -121,7 +122,8 @@
FINAL_CHECKOR,
FINAL_CHECKTIME,
FINAL_CHECKDESCR,
POSITIONDESC
POSITIONDESC,
HIDDENTYPE_NAME
</sql>
<!-- 字段值 -->
@ -177,7 +179,8 @@
#{FINAL_CHECKOR},
#{FINAL_CHECKTIME},
#{FINAL_CHECKDESCR},
#{POSITIONDESC}
#{POSITIONDESC},
#{HIDDENTYPE_NAME}
</sql>
<!-- 新增-->
@ -287,7 +290,6 @@
f.*,
hr.HIDDENREGION HIDDENPART_NAME,
lv.NAME HIDDENLEVEL_NAME,
ht.NAME HIDDENTYPE_NAME,
ht2.NAME HIDDENTYPE2_NAME,
crd.NAME HIDDENFINDDEPT_NAME,
cr.NAME CREATOR_NAME,
@ -313,7 +315,6 @@
f.*,
hr.HIDDENREGION HIDDENPART_NAME,
lv.NAME HIDDENLEVEL_NAME,
ht.NAME HIDDENTYPE_NAME,
ht2.NAME HIDDENTYPE2_NAME,
crd.NAME HIDDENFINDDEPT_NAME,
cr.NAME CREATOR_NAME,
@ -1123,7 +1124,6 @@
f.*,
hr.HIDDENREGION HIDDENPART_NAME,
lv.NAME HIDDENLEVEL_NAME,
ht.NAME HIDDENTYPE_NAME,
ht2.NAME HIDDENTYPE2_NAME,
crd.NAME HIDDENFINDDEPT_NAME,
cr.NAME CREATOR_NAME,
@ -1637,7 +1637,6 @@
f.*,
hr.HIDDENREGION HIDDENPART_NAME,
lv.NAME HIDDENLEVEL_NAME,
ht.NAME HIDDENTYPE_NAME,
ht2.NAME HIDDENTYPE2_NAME,
crd.NAME HIDDENFINDDEPT_NAME,
cr.NAME CREATOR_NAME,

View File

@ -137,7 +137,7 @@
<include refid="Field"></include>,
cr.NAME CREATOR_NAME,
cre.NAME CREATOR_NAMES,
o.OUTSOURCED_NAME,
bo.OUTSOURCED_NAME,
u.UNITS_NAME,
p.NAME AS PERSON_NAME
from
@ -145,7 +145,9 @@
left join vi_user_all cr on cr.USER_ID = f.CREATOR
left join sys_user cre on cre.USER_ID = f.CREATOR
left join BUS_UNITS u on u.UNITS_ID = f.UNITS_ID
left join BUS_OUTSOURCED o on o.UNITS_ID = u.UNITS_ID
left join bus_keyproject_hidden h on f.HIDDEN_ID = h.HIDDEN_ID
LEFT JOIN BUS_KEYPROJECTCHECK ch ON ch.OUTSOURCED_ID = h.FOREIGN_ID or h.FOREIGN_ID = ch.KEYPROJECTCHECK_ID
LEFT JOIN BUS_OUTSOURCED bo ON bo.OUTSOURCED_ID = ch.OUTSOURCED_ID <!-- 用于安全环保检查隐患的重点工程名称 -->
left join BUS_PERSONNELMANAGEMENT p on p.PERSONNELMANAGEMENT_ID = f.PERSONNELMANAGEMENT_ID
where
<if test="KEYPROJECTPUNISH_ID != null and KEYPROJECTPUNISH_ID != ''"><!-- 关键词检索 -->

View File

@ -218,7 +218,7 @@
<include refid="tableName"></include> f
LEFT JOIN sys_user u on f.CREATOR = u.USERNAME
LEFT JOIN bus_corp_info c on u.CORPINFO_ID = c.CORPINFO_ID
where f.ISDELETE = '0'
where f.ISDELETE = '0' and u.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(

View File

@ -88,7 +88,7 @@
<select id="datalistPage" resultType="com.zcloud.entity.PageData">
SELECT
t.*,
COUNT(distinct p.SAFETY_MEETING_ID) ALL_SIGNATURES,
(select count(*) from safety_meeting_people m where m.SAFETY_MEETING_ID = t.SAFETY_MEETING_ID and m.ISDELETE = 0) ALL_SIGNATURES,
COUNT(distinct p.FEED_BACK) SIGNATURES,
GROUP_CONCAT( distinct i.FILEPATH ) imgs
FROM
@ -96,8 +96,8 @@
LEFT JOIN bus_imgfiles i ON t.SAFETY_MEETING_ID = i.FOREIGN_KEY
LEFT JOIN safety_meeting_people p ON t.SAFETY_MEETING_ID = p.SAFETY_MEETING_ID and p.ISDELETE = 0
where t.ISDELETE = '0' and t.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.SAFETY_MEETING_TITLE != null and pd.SAFETY_MEETING_TITLE != ''">
and t.SAFETY_MEETING_TITLE like '%${pd.SAFETY_MEETING_TITLE}%'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
and t.SAFETY_MEETING_TITLE like '%${pd.KEYWORDS}%'
</if>
GROUP BY
t.SAFETY_MEETING_ID

View File

@ -189,9 +189,9 @@
left join sys_dictionaries o on o.DICTIONARIES_ID = f.OPERATIONITEM
left join bus_corp_info b on b.CORPINFO_ID = f.CORPINFO_ID
left join bus_units r on r.UNITS_ID = f.UNITS_ID
LEFT JOIN sys_user u on f.CREATOR = u.USERNAME
LEFT JOIN sys_user u on f.CREATOR = u.USERNAME and u.ISDELETE = '0'
LEFT JOIN bus_corp_info c on u.CORPINFO_ID = c.CORPINFO_ID
where f.ISDELETE = '0'
where f.ISDELETE = '0' and u.ISDELETE = '0'
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
and
(
@ -266,10 +266,12 @@
<select id="findByOutsourced" parameterType="pd" resultType="pd">
select
f.*
f.*,
u.UNITS_NAME
from
<include refid="tableName"></include> f
left join BUS_OUTSOURCED t on t.UNITS_PIC = f.PERSONNELMANAGEMENT_ID
left join bus_units u on f.UNITS_ID = u.UNITS_ID
where
t.OUTSOURCED_ID = #{OUTSOURCED_ID}
and t.ISDELETE = '0'