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

pull/4/head
fangjiakai 2024-02-05 15:53:27 +08:00
commit ac4bb34820
13 changed files with 354 additions and 267 deletions

View File

@ -1950,6 +1950,7 @@ public class ListManagerController extends BaseController {
npd.put("PERIOD",pd.getString("PERIOD")); npd.put("PERIOD",pd.getString("PERIOD"));
npd.put("STATUS",pd.getString("STATUS")); npd.put("STATUS",pd.getString("STATUS"));
npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL")); npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
npd.put("LIST_TYPE",pd.getString("LIST_TYPE"));
page.setPd(npd); page.setPd(npd);
List<PageData> varList = listmanagerService.riskStandardCheckList(page); //列出ListManager列表 List<PageData> varList = listmanagerService.riskStandardCheckList(page); //列出ListManager列表
for (PageData list : varList) { for (PageData list : varList) {

View File

@ -48,7 +48,10 @@ public class CommonController extends BaseController {
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
PageData corpinfo = corpinfoService.findById(pd); //根据ID读取 PageData corpinfo = corpinfoService.findById(pd); //根据ID读取
pd.put("CORP_TYPE_NAME", corpinfo.getString("CORP_TYPE_NAME")); pd.put("CORP_TYPE", corpinfo.getString("CORP_TYPE"));
pd.put("CORP_TYPE2", corpinfo.getString("CORP_TYPE2"));
pd.put("CORP_TYPE3", corpinfo.getString("CORP_TYPE3"));
pd.put("CORP_TYPE4", corpinfo.getString("CORP_TYPE4"));
page.setPd(pd); page.setPd(pd);
List<PageData> varList = commonService.list(page); //列出RiskCheckItem列表 List<PageData> varList = commonService.list(page); //列出RiskCheckItem列表
map.put("varList", varList); map.put("varList", varList);

View File

@ -1759,91 +1759,127 @@ public class CustomController extends BaseController {
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
//
// /**清单检查记录(日检)统计 /**
// * @param * @param out
// * @throws Exception * @throws Exception
// */ */
// @RequestMapping(value="/statisticsListCheckDay") @RequestMapping(value="/enable")
// @ResponseBody // @RequiresPermissions("listmanager:del")
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(日检)统计") @ResponseBody
// public Object statisticsListCheckDay() throws Exception{ @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "启用")
// Map<String,Object> map = new HashMap<String,Object>(); public Object enable() throws Exception{
// String errInfo = "success"; Map<String,String> map = new HashMap<String,String>();
// PageData pd = new PageData(); String errInfo = "success";
// pd = this.getPageData(); PageData pd = new PageData();
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 pd = this.getPageData();
// if (Tools.notEmpty(KEYWORDS)) pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
// pd.put("KEYWORDS", KEYWORDS.trim()); pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// customService.enable(pd);
// System.out.println(pd.getString("KEYWORDS")); pd = customService.findById(pd);
// List<PageData> varList = listcheckitemService.listAll(pd); // 启用清单时,修改禁用清单时间段的结束时间
// PageData data = listmanagerService.findById(pd); //根据ID读取 PageData disPd = new PageData();
// data.put("YEAR", pd.getString("YEAR")); disPd.put("CUSTOM_ID", pd.get("CUSTOM_ID"));
// List<PageData> recordList = checkrecordService.listAllYearForDay(data);//获取查询月在检查周期内的检查记录 disPd.put("CORPINFO_ID", pd.get("CORPINFO_ID"));
// disPd = customDisableTimeService.findByList(pd);
// map.put("pd", data); disPd.put("ENDTIME", DateUtil.date2Str(new Date()));
// map.put("varList", varList); disPd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
// map.put("recordList", recordList); disPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// map.put("result", errInfo); customDisableTimeService.editEndTime(disPd);
// return map; // 修改清单统计
// } if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
// if("listType0005".equals(pd.get("TYPE").toString())) {
// /**清单检查记录(周检)统计 pd.put("CUSTOMSTATISTICS_ID", this.get32UUID()); //主键
// * @param pd.put("STARTTIME", pd.get("START_DATE").toString()+" 00:00:00");
// * @throws Exception pd.put("ENDTIME", pd.get("END_DATE").toString()+" 23:59:59");
// */ pd.put("PERIOD", null);
// @RequestMapping(value="/statisticsListCheckWeek") PageData statistics = customStatisticsService.findByCondition(pd);
// @ResponseBody if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(周检)统计") statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+2);
// public Object statisticsListCheckWeek() throws Exception{ customStatisticsService.edit(statistics);
// Map<String,Object> map = new HashMap<String,Object>(); }
// String errInfo = "success"; pd.put("ISSTATISTICS", '1');
// PageData pd = new PageData(); // 本期已检查的不计入统计
// pd = this.getPageData(); customCheckRecordService.editStatistics(pd);
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 } else {
// if (Tools.notEmpty(KEYWORDS)) if(pd.get("PERIOD") != null && Tools.notEmpty(pd.get("PERIOD").toString())) {
// pd.put("KEYWORDS", KEYWORDS.trim()); String period = pd.get("PERIOD").toString();
// switch (period) {
// System.out.println(pd.getString("KEYWORDS")); case "checkPeriod0001"://每日
// List<PageData> varList = listcheckitemService.listAll(pd); pd.put("STARTTIME", DateUtil.getDay()+" 00:00:00");
// PageData data = listmanagerService.findById(pd); //根据ID读取 pd.put("ENDTIME", DateUtil.getDay()+" 23:59:59");
// data.put("YEAR", pd.getString("YEAR")); break;
// List<PageData> recordList = checkrecordService.listAllYearForWeek(data);//获取检查周期内的检查记录
// case "checkPeriod0002"://每周
// map.put("pd", data); pd.put("STARTTIME", DateUtil.getWeekStart());
// map.put("varList", varList); pd.put("ENDTIME", DateUtil.getWeekEnd());
// map.put("recordList", recordList); break;
// map.put("result", errInfo);
// return map; case "checkPeriod0003"://每旬
// } String year = DateUtil.getYear().toString();
// String month = DateUtil.getMonth().toString();
// /**清单检查记录(旬检)统计 Integer day = Integer.parseInt(DateUtil.getOnlyDay().toString());
// * @param String startTime = year + "-" + month + "-";
// * @throws Exception String endTime = year + "-" + month + "-";
// */ if(day <= 10) {
// @RequestMapping(value="/statisticsListCheckTenday") startTime = startTime+"01 00:00:00";
// @ResponseBody endTime = endTime+"10 23:59:59";
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(旬检)统计") } else if(day > 10 && day <= 20) {
// public Object statisticsListCheckTenday() throws Exception{ startTime = startTime+"11 00:00:00";
// Map<String,Object> map = new HashMap<String,Object>(); endTime = endTime+"20 23:59:59";
// String errInfo = "success"; } else {
// PageData pd = new PageData(); startTime = startTime+"21 00:00:00";
// pd = this.getPageData(); endTime = DateUtil.getMonthEndDay()+" 23:59:59";
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件 }
// if (Tools.notEmpty(KEYWORDS)) pd.put("STARTTIME", startTime);
// pd.put("KEYWORDS", KEYWORDS.trim()); pd.put("ENDTIME", endTime);
// break;
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd); case "checkPeriod0004"://每月
// PageData data = listmanagerService.findById(pd); //根据ID读取 pd.put("STARTTIME", DateUtil.getMonthFirstDay()+" 00:00:00");
// data.put("YEAR", pd.getString("YEAR")); pd.put("ENDTIME", DateUtil.getMonthEndDay()+" 23:59:59");
// List<PageData> recordList = checkrecordService.statisticsListCheckTenday(data);//获取检查周期内的检查记录 break;
//
// map.put("pd", data); case "checkPeriod0005"://每季
// map.put("varList", varList); pd.put("STARTTIME", DateUtil.quarterStart()+" 00:00:00");
// map.put("recordList", recordList); pd.put("ENDTIME", DateUtil.quarterEnd()+" 23:59:59");
// map.put("result", errInfo); break;
// return map;
// } 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 = customStatisticsService.findByCondition(pd);
if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+1);
customStatisticsService.edit(statistics);
}
pd.put("ISSTATISTICS", '1');
// 本期已检查的不计入统计
customCheckRecordService.editStatistics(pd);
}
}
// 将本频率内已检查的记录,改为不计入
map.put("result", errInfo); //返回结果
return map;
}
} }

View File

@ -63,6 +63,9 @@ public class AppKeyprojectCheckController extends BaseController {
@Autowired Smb smb; @Autowired Smb smb;
@Autowired
private SendMessageUtil sendMessageUtil;
/** /**
* *
@ -153,16 +156,19 @@ public class AppKeyprojectCheckController extends BaseController {
PageData person = new PageData(); PageData person = new PageData();
person.put("PERSONNELMANAGEMENT_ID", pd.getString("PERSONNELMANAGEMENT_ID")); person.put("PERSONNELMANAGEMENT_ID", pd.getString("PERSONNELMANAGEMENT_ID"));
person = personnelmanagementService.findById(person); person = personnelmanagementService.findById(person);
// outSource.get("OUTSOURCED_NAME")
JSONArray jsonArray = new JSONArray(); PageData mes = new PageData();
//接受返回结果 mes.put("templateCode", "SMS_215820677");// 短信模板编码
JSONObject records = new JSONObject(); mes.put("CORPINFO_ID", person.get("CORPINFO_ID"));
//定义替换参数 // 参数集合
JSONObject tpContent = new JSONObject(); List<PageData> paramsList = new ArrayList<PageData>();
tpContent.put("OUTSOURCEDNAME", outSource.getString("OUTSOURCED_NAME")); // 第1个参数
records = SendSmsUtil.getRecords(person.getString("PHONENUM"), tpContent); PageData params1 = new PageData();
jsonArray.add(records); params1.put("name", "time");// 存入短信模板中的参数名称
SendSmsUtil.sendSms("121451", jsonArray, null); params1.put("value", outSource.getString("OUTSOURCED_NAME"));// 存入上面参数名称所传递的值
paramsList.add(params1);
sendMessageUtil.sendMessagesKeyproject(mes,person.getString("PHONENUM"), paramsList);
//发送罚款待处理 上文开关控制这里发送不 //发送罚款待处理 上文开关控制这里发送不
if (boo) { if (boo) {
List<JSONObject> jsonList = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON")); List<JSONObject> jsonList = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
@ -174,16 +180,18 @@ public class AppKeyprojectCheckController extends BaseController {
List<String> list = keyprojectHiddenService.getPhone(selectPageData); List<String> list = keyprojectHiddenService.getPhone(selectPageData);
for (JSONObject json : jsonList) { for (JSONObject json : jsonList) {
for (String phone : list) { for (String phone : list) {
JSONArray jsonBrray = new JSONArray();
//接受返回结果
JSONObject recordsB = new JSONObject();
//定义替换参数
JSONObject tpContentB = new JSONObject();
tpContentB.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述
if (StringUtils.isNotBlank(phone)) { if (StringUtils.isNotBlank(phone)) {
recordsB = SendSmsUtil.getRecords(phone, tpContentB); PageData mes2 = new PageData();
jsonBrray.add(recordsB); mes.put("templateCode", "SMS_215820677");// 短信模板编码
SendSmsUtil.sendSms("121487", jsonBrray, null); mes.put("CORPINFO_ID", person.get("CORPINFO_ID"));
// 参数集合
List<PageData> paramsList2 = new ArrayList<PageData>();
// 第1个参数
PageData params2 = new PageData();
params1.put("name", "time");// 存入短信模板中的参数名称
params1.put("value", json.getString("HIDDENDESCR"));// 存入上面参数名称所传递的值
paramsList.add(params2);
sendMessageUtil.sendMessagesKeyproject(mes2,phone, paramsList2);
} }
} }
} }
@ -292,15 +300,17 @@ public class AppKeyprojectCheckController extends BaseController {
List<PageData> smsList = keyprojectcheckService.getSmsList(pd); List<PageData> smsList = keyprojectcheckService.getSmsList(pd);
if (!Tools.isEmpty(smsList)) { if (!Tools.isEmpty(smsList)) {
for (PageData pageData : smsList) { for (PageData pageData : smsList) {
JSONArray jsonArray = new JSONArray(); PageData mes = new PageData();
//接受返回结果 mes.put("templateCode", "SMS_215820677");// 短信模板编码
JSONObject records = new JSONObject(); mes.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));// 企业id
//定义替换参数 // 参数集合
JSONObject tpContent = new JSONObject(); List<PageData> paramsList = new ArrayList<PageData>();
tpContent.put("HIDDENDESCR", pageData.getString("HIDDENDESCR")); // 第1个参数
records = SendSmsUtil.getRecords(pageData.getString("PHONENUM"), tpContent); PageData params1 = new PageData();
jsonArray.add(records); params1.put("name", "time");// 存入短信模板中的参数名称
SendSmsUtil.sendSms("121486", jsonArray, null); params1.put("value", pageData.getString("HIDDENDESCR"));// 存入上面参数名称所传递的值
paramsList.add(params1);
sendMessageUtil.sendMessagesKeyproject(mes,pageData.getString("PHONENUM"), paramsList);
} }
} }
@ -630,16 +640,17 @@ public class AppKeyprojectCheckController extends BaseController {
List<PageData> smsList = keyprojectHiddenService.getSmsList(pd); List<PageData> smsList = keyprojectHiddenService.getSmsList(pd);
if (!Tools.isEmpty(smsList)) { if (!Tools.isEmpty(smsList)) {
for (PageData pageData : smsList) { for (PageData pageData : smsList) {
JSONArray jsonArray = new JSONArray(); PageData mes = new PageData();
//接受返回结果 mes.put("templateCode", "SMS_215820677");// 短信模板编码
JSONObject records = new JSONObject(); mes.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));// 企业id
//定义替换参数 // 参数集合
JSONObject tpContent = new JSONObject(); List<PageData> paramsList = new ArrayList<PageData>();
tpContent.put("HIDDENDESCR", pageData.getString("HIDDENDESCR")); // 第1个参数
HIDDENDESCR = pageData.getString("HIDDENDESCR"); PageData params1 = new PageData();
records = SendSmsUtil.getRecords(pageData.getString("PHONE"), tpContent); params1.put("name", "time");// 存入短信模板中的参数名称
jsonArray.add(records); params1.put("value", pageData.getString("HIDDENDESCR"));// 存入上面参数名称所传递的值
SendSmsUtil.sendSms("121488", jsonArray, null); paramsList.add(params1);
sendMessageUtil.sendMessagesKeyproject(mes,pageData.getString("PHONENUM"), paramsList);
} }
} }

View File

@ -22,10 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* *
@ -57,6 +54,9 @@ public class AppKeyprojectPunishController extends BaseController {
@Autowired @Autowired
private PersonnelManagementService personnelmanagementService; private PersonnelManagementService personnelmanagementService;
@Autowired
private SendMessageUtil sendMessageUtil;
/** /**
* @param * @param
* @throws Exception * @throws Exception
@ -135,16 +135,18 @@ public class AppKeyprojectPunishController extends BaseController {
PageData person = new PageData(); PageData person = new PageData();
person.put("PERSONNELMANAGEMENT_ID", pd.getString("PERSONNELMANAGEMENT_ID")); person.put("PERSONNELMANAGEMENT_ID", pd.getString("PERSONNELMANAGEMENT_ID"));
person = personnelmanagementService.findById(person); person = personnelmanagementService.findById(person);
// outSource.get("OUTSOURCED_NAME")
JSONArray jsonArray = new JSONArray(); PageData mes = new PageData();
//接受返回结果 mes.put("templateCode", "SMS_215820677");// 短信模板编码
JSONObject records = new JSONObject(); mes.put("CORPINFO_ID", person.get("CORPINFO_ID"));// 企业id
//定义替换参数 // 参数集合
JSONObject tpContent = new JSONObject(); List<PageData> paramsList = new ArrayList<PageData>();
tpContent.put("REASON", pd.getString("REASON")); // 第1个参数
records = SendSmsUtil.getRecords(person.getString("PHONENUM"), tpContent); PageData params1 = new PageData();
jsonArray.add(records); params1.put("name", "time");// 存入短信模板中的参数名称
SendSmsUtil.sendSms("121490", jsonArray, null); params1.put("value", pd.getString("REASON"));// 存入上面参数名称所传递的值
paramsList.add(params1);
sendMessageUtil.sendMessagesKeyproject(mes,person.getString("PHONENUM"), paramsList);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -118,6 +118,40 @@ public class SendMessageUtil {
return map; return map;
} }
/**
*
* @param pd
* @param paramsList
* @throws Exception
*/
public Object sendMessagesKeyproject(PageData pd, String phone, List<PageData> paramsList) throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
// 查询公司信息
PageData corpinfo = new PageData();
corpinfo.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
corpinfo =corpinfoService.findById(corpinfo);
// 查看公司剩余短信条数是否足以支持发送短信
Boolean canSend = checkCorpMsg(corpinfo);
if(canSend) {
// 发送短信
SendSmsResponse ssms= send(pd, phone, paramsList);
if(ssms.getCode().equals("OK")){
map.put("result", "success");
}else{
map.put("result", "fail");
map.put("msg", "您的操作过去频繁,请稍后重试!");
return map;
}
} else {
map.put("result", "fail");
map.put("msg", "公司剩余短信数量不足");
return map;
}
return map;
}
/** /**
* *
* @return * @return

View File

@ -1,116 +0,0 @@
package com.zcloud.util;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.http.MediaType;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import static org.bouncycastle.asn1.x500.style.RFC4519Style.cn;
/**
*
*/
public class SendSmsUtil {
private static String USERNAME = "qhdzyhy";
private static String PASSWORD = "3ba40593f514f0c1ebdfc278dddfc9ce";
private static String SIGNATURE = "【秦港双控】";
private static String URL = "https://api.mix2.zthysms.com/v2/sendSmsTp";
/**
*
* @param records
* @param time
* records records JSONArray getRecords JSONObject JSONArray put
* "records":[
* {
* "mobile":"138****0000",
* "tpContent":{
* "var1":"变量1",
* "var2":"变量2"
* }
* },
* {
* "mobile":"138****0001",
* "tpContent":{
* "var1":"变量2",
* "var2":"变量2"
* }
* }
* ]
*/
public static void sendSms(String tpId,JSONArray records ,String time) throws ParseException {
JSONObject json = new JSONObject();
Long tKey = System.currentTimeMillis()/1000;
String passWord = MD5.md5(PASSWORD+tKey);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//扔参数
json.put("username",USERNAME);
json.put("password",passWord);
json.put("tKey",tKey);
json.put("signature",SIGNATURE);
json.put("tpId",tpId);
if(StringUtils.isNotBlank(time)){
if(sdf.parse(time).after(new Date())){
json.put("time",time);
}
}
json.put("records",records);
System.out.println(json.toJSONString());
String result = HttpRequest.post(URL)
.timeout(60000)
.body(json.toJSONString(), MediaType.APPLICATION_JSON_UTF8_VALUE).execute().body();
System.out.println(result);
}
/**
*
* @param mobile
* @param tpContent
* @return
* var1 1
* {
* "mobile":"138****0000",
* "tpContent":{
* "var1":"变量1",
* "var2":"变量2"
* }
* }
*/
public static JSONObject getRecords(String mobile, JSONObject tpContent ){
JSONObject json = new JSONObject();
json.put("mobile",mobile);
if(ObjectUtils.hashCode(tpContent)!=0){
json.put("tpContent",tpContent);
}
return json;
}//d22f8a5d4a35b3761dc9525186e652a0
//测试接口
public static void main(String[] args) throws ParseException {
JSONArray jsonArray = new JSONArray();
//接受返回结果
JSONObject records = new JSONObject();
//定义替换参数
JSONObject tpContent = new JSONObject();
tpContent.put("HIDDENDESCR","测试发送111--222-1");
records = getRecords("18617456701",tpContent);
jsonArray.add(records);
//sendSms("121487",jsonArray,null);
}
}

View File

@ -1514,6 +1514,9 @@
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="pd.LIST_TYPE != null and pd.LIST_TYPE != ''">
and "1" = #{pd.LIST_TYPE}
</if>
order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc ) order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc )
union union
(select (select
@ -1550,6 +1553,106 @@
and and
f.CORPINFO_ID = #{pd.CORPINFO_ID} f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if> </if>
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((f.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
(f.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.USER_ID = #{pd.USER_ID})
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
f.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and f.USER_ID = #{pd.USER_ID}
and f.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<if test="pd.USERNAME != null and pd.USERNAME != ''"> <if test="pd.USERNAME != null and pd.USERNAME != ''">
and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%') and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
</if> </if>
@ -1562,10 +1665,10 @@
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 --> <if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
<choose> <choose>
<when test='pd.STATUS=="1"'> <when test='pd.STATUS=="1"'>
AND getCheckedNum(f.LISTMANAGER_ID) &gt; 0 AND getStandardCheckedNum(f.CUSTOM_ID) &gt; 0
</when> </when>
<when test='pd.STATUS=="0"'> <when test='pd.STATUS=="0"'>
AND getCheckedNum(f.LISTMANAGER_ID) = 0 AND getStandardCheckedNum(f.CUSTOM_ID) = 0
</when> </when>
<otherwise> <otherwise>
</otherwise> </otherwise>
@ -1581,6 +1684,9 @@
</otherwise> </otherwise>
</choose> </choose>
</if> </if>
<if test="pd.LIST_TYPE != null and pd.LIST_TYPE != ''">
and "2" = #{pd.LIST_TYPE}
</if>
order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc ) order by f.USER_ID= #{pd.orderUserId} desc ,f.DEPARTMENT_ID asc,f.OPERATTIME desc )
</select> </select>

View File

@ -97,7 +97,10 @@
and bhci.ISDELETE = 0 and bhci.ISDELETE = 0
and f.COMMON_STATUS = 1 and f.COMMON_STATUS = 1
and bhci.COMMON_ITEM_STATUS = 1 and bhci.COMMON_ITEM_STATUS = 1
<!-- and f.INDUSTRY_TYPE_NAMES = #{pd.CORP_TYPE_NAME} --> and ( f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE}),'%')
or f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE2}),'%')
or f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE3}),'%')
or f.INDUSTRY_TYPE_TREE LIKE CONCAT(CONCAT('%', #{pd.CORP_TYPE4}),'%') )
<if test="pd.OTHERKEYWORDS != null and pd.OTHERKEYWORDS != ''"><!-- 关键词检索 --> <if test="pd.OTHERKEYWORDS != null and pd.OTHERKEYWORDS != ''"><!-- 关键词检索 -->
and and
( (

View File

@ -4,7 +4,7 @@
<!--表名 --> <!--表名 -->
<sql id="tableName"> <sql id="tableName">
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME BUS_HIDDENDANGERCHECKSTANDARD_DISABLETIME
</sql> </sql>
<!--数据字典表名 --> <!--数据字典表名 -->
@ -15,7 +15,7 @@
<!-- 字段 --> <!-- 字段 -->
<sql id="Field"> <sql id="Field">
f.CUSTOMDISABLETIME_ID, f.CUSTOMDISABLETIME_ID,
f.CUSTOM_ID f.CUSTOM_ID,
f.CORPINFO_ID, f.CORPINFO_ID,
f.STARTTIME, f.STARTTIME,
f.ENDTIME, f.ENDTIME,
@ -80,7 +80,7 @@
update update
<include refid="tableName"></include> <include refid="tableName"></include>
set set
LISTMANAGER_ID = #{LISTMANAGER_ID}, CUSTOM_ID = #{CUSTOM_ID},
CORPINFO_ID = #{CORPINFO_ID}, CORPINFO_ID = #{CORPINFO_ID},
STARTTIME = #{STARTTIME}, STARTTIME = #{STARTTIME},
ENDTIME = #{ENDTIME}, ENDTIME = #{ENDTIME},

View File

@ -218,10 +218,15 @@
</update> </update>
<select id="getSmsList" parameterType="pd" resultType="pd"> <select id="getSmsList" parameterType="pd" resultType="pd">
SELECT ry.PHONENUM as PHONENUM,yh.HIDDENDESCR as HIDDENDESCR FROM BUS_KEYPROJECTCHECK t SELECT
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED gc on gc.OUTSOURCED_ID = t.OUTSOURCED_ID ry.PHONENUM as PHONENUM,
yh.HIDDENDESCR as HIDDENDESCR,
un.CORPINFO_ID
FROM BUS_KEYPROJECTCHECK t
LEFT JOIN BUS_OUTSOURCED gc on gc.OUTSOURCED_ID = t.OUTSOURCED_ID
LEFT JOIN BUS_KEYPROJECT_HIDDEN yh on yh.FOREIGN_ID = t.KEYPROJECTCHECK_ID LEFT JOIN BUS_KEYPROJECT_HIDDEN yh on yh.FOREIGN_ID = t.KEYPROJECTCHECK_ID
LEFT JOIN `qa-gwj-regulatory`.`BUS_PERSONNELMANAGEMENT` ry on ry.PERSONNELMANAGEMENT_ID = yh.RECTIFICATIONOR LEFT JOIN BUS_PERSONNELMANAGEMENT ry on ry.PERSONNELMANAGEMENT_ID = yh.RECTIFICATIONOR
LEFT JOIN bus_units un on ry.UNITS_ID = un.UNITS_ID
WHERE t.KEYPROJECTCHECK_ID=#{KEYPROJECTCHECK_ID} WHERE t.KEYPROJECTCHECK_ID=#{KEYPROJECTCHECK_ID}
AND gc.IS_SMS = '0' AND gc.IS_SMS = '0'

View File

@ -987,7 +987,7 @@
and f.VILLAGE = #{DEPT_VILLAGE} and f.VILLAGE = #{DEPT_VILLAGE}
</if> </if>
<if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''"> <if test="DEPARTMENT_ID != null and DEPARTMENT_ID != ''">
and f.CORP_OF_TYPE in (select CORPTYPE_ID from `qa-gwj-regulatory`.BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID}) and f.CORP_OF_TYPE in (select CORPTYPE_ID from BUS_CORPTYPETODEPT ctod where ctod.DEPARTMENT_ID=#{DEPARTMENT_ID})
</if> </if>
left join BUS_HIDDEN h on f.CORPINFO_ID=h.CORPINFO_ID and h.ISDELETE='0' left join BUS_HIDDEN h on f.CORPINFO_ID=h.CORPINFO_ID and h.ISDELETE='0'

View File

@ -164,9 +164,11 @@
<!-- 通过ID获取数据 --> <!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd"> <select id="findById" parameterType="pd" resultType="pd">
select select
<include refid="Field"></include> <include refid="Field"></include>,
u.CORPINFO_ID
from from
<include refid="tableName"></include> f <include refid="tableName"></include> f
left join bus_units u on f.UNITS_ID = u.UNITS_ID
where where
f.PERSONNELMANAGEMENT_ID = #{PERSONNELMANAGEMENT_ID} f.PERSONNELMANAGEMENT_ID = #{PERSONNELMANAGEMENT_ID}
</select> </select>