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("STATUS",pd.getString("STATUS"));
npd.put("LISTINGLEVEL",pd.getString("LISTINGLEVEL"));
npd.put("LIST_TYPE",pd.getString("LIST_TYPE"));
page.setPd(npd);
List<PageData> varList = listmanagerService.riskStandardCheckList(page); //列出ListManager列表
for (PageData list : varList) {

View File

@ -48,7 +48,10 @@ public class CommonController extends BaseController {
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_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);
List<PageData> varList = commonService.list(page); //列出RiskCheckItem列表
map.put("varList", varList);

View File

@ -1759,91 +1759,127 @@ public class CustomController extends BaseController {
map.put("result", errInfo);
return map;
}
//
// /**清单检查记录(日检)统计
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/statisticsListCheckDay")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(日检)统计")
// public Object statisticsListCheckDay() throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
// if (Tools.notEmpty(KEYWORDS))
// pd.put("KEYWORDS", KEYWORDS.trim());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// PageData data = listmanagerService.findById(pd); //根据ID读取
// data.put("YEAR", pd.getString("YEAR"));
// List<PageData> recordList = checkrecordService.listAllYearForDay(data);//获取查询月在检查周期内的检查记录
//
// map.put("pd", data);
// map.put("varList", varList);
// map.put("recordList", recordList);
// map.put("result", errInfo);
// return map;
// }
//
// /**清单检查记录(周检)统计
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/statisticsListCheckWeek")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(周检)统计")
// public Object statisticsListCheckWeek() throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
// if (Tools.notEmpty(KEYWORDS))
// pd.put("KEYWORDS", KEYWORDS.trim());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// PageData data = listmanagerService.findById(pd); //根据ID读取
// data.put("YEAR", pd.getString("YEAR"));
// List<PageData> recordList = checkrecordService.listAllYearForWeek(data);//获取检查周期内的检查记录
//
// map.put("pd", data);
// map.put("varList", varList);
// map.put("recordList", recordList);
// map.put("result", errInfo);
// return map;
// }
//
// /**清单检查记录(旬检)统计
// * @param
// * @throws Exception
// */
// @RequestMapping(value="/statisticsListCheckTenday")
// @ResponseBody
// @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "清单管理",instructionsType = "清单检查记录(旬检)统计")
// public Object statisticsListCheckTenday() throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// String KEYWORDS = pd.getString("KEYWORDS"); // 关键词检索条件
// if (Tools.notEmpty(KEYWORDS))
// pd.put("KEYWORDS", KEYWORDS.trim());
//
// System.out.println(pd.getString("KEYWORDS"));
// List<PageData> varList = listcheckitemService.listAll(pd);
// PageData data = listmanagerService.findById(pd); //根据ID读取
// data.put("YEAR", pd.getString("YEAR"));
// List<PageData> recordList = checkrecordService.statisticsListCheckTenday(data);//获取检查周期内的检查记录
//
// map.put("pd", data);
// map.put("varList", varList);
// map.put("recordList", recordList);
// map.put("result", errInfo);
// return map;
// }
/**
* @param out
* @throws Exception
*/
@RequestMapping(value="/enable")
// @RequiresPermissions("listmanager: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 = customDisableTimeService.findByList(pd);
disPd.put("ENDTIME", DateUtil.date2Str(new Date()));
disPd.put("OPERATOR", Jurisdiction.getUsername()); //修改人
disPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
customDisableTimeService.editEndTime(disPd);
// 修改清单统计
if(pd.get("TYPE") != null && Tools.notEmpty(pd.get("TYPE").toString())) {
if("listType0005".equals(pd.get("TYPE").toString())) {
pd.put("CUSTOMSTATISTICS_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 = customStatisticsService.findByCondition(pd);
if(statistics != null && statistics.get("CUSTOMSTATISTICS_ID") != null) {
statistics.put("NOTEXAMINEDNUM", Integer.parseInt(statistics.get("NOTEXAMINEDNUM").toString())+2);
customStatisticsService.edit(statistics);
}
pd.put("ISSTATISTICS", '1');
// 本期已检查的不计入统计
customCheckRecordService.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 = 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
private SendMessageUtil sendMessageUtil;
/**
*
@ -153,16 +156,19 @@ public class AppKeyprojectCheckController extends BaseController {
PageData person = new PageData();
person.put("PERSONNELMANAGEMENT_ID", pd.getString("PERSONNELMANAGEMENT_ID"));
person = personnelmanagementService.findById(person);
// outSource.get("OUTSOURCED_NAME")
JSONArray jsonArray = new JSONArray();
//接受返回结果
JSONObject records = new JSONObject();
//定义替换参数
JSONObject tpContent = new JSONObject();
tpContent.put("OUTSOURCEDNAME", outSource.getString("OUTSOURCED_NAME"));
records = SendSmsUtil.getRecords(person.getString("PHONENUM"), tpContent);
jsonArray.add(records);
SendSmsUtil.sendSms("121451", jsonArray, null);
PageData mes = new PageData();
mes.put("templateCode", "SMS_215820677");// 短信模板编码
mes.put("CORPINFO_ID", person.get("CORPINFO_ID"));
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "time");// 存入短信模板中的参数名称
params1.put("value", outSource.getString("OUTSOURCED_NAME"));// 存入上面参数名称所传递的值
paramsList.add(params1);
sendMessageUtil.sendMessagesKeyproject(mes,person.getString("PHONENUM"), paramsList);
//发送罚款待处理 上文开关控制这里发送不
if (boo) {
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);
for (JSONObject json : jsonList) {
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)) {
recordsB = SendSmsUtil.getRecords(phone, tpContentB);
jsonBrray.add(recordsB);
SendSmsUtil.sendSms("121487", jsonBrray, null);
PageData mes2 = new PageData();
mes.put("templateCode", "SMS_215820677");// 短信模板编码
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);
if (!Tools.isEmpty(smsList)) {
for (PageData pageData : smsList) {
JSONArray jsonArray = new JSONArray();
//接受返回结果
JSONObject records = new JSONObject();
//定义替换参数
JSONObject tpContent = new JSONObject();
tpContent.put("HIDDENDESCR", pageData.getString("HIDDENDESCR"));
records = SendSmsUtil.getRecords(pageData.getString("PHONENUM"), tpContent);
jsonArray.add(records);
SendSmsUtil.sendSms("121486", jsonArray, null);
PageData mes = new PageData();
mes.put("templateCode", "SMS_215820677");// 短信模板编码
mes.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));// 企业id
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "time");// 存入短信模板中的参数名称
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);
if (!Tools.isEmpty(smsList)) {
for (PageData pageData : smsList) {
JSONArray jsonArray = new JSONArray();
//接受返回结果
JSONObject records = new JSONObject();
//定义替换参数
JSONObject tpContent = new JSONObject();
tpContent.put("HIDDENDESCR", pageData.getString("HIDDENDESCR"));
HIDDENDESCR = pageData.getString("HIDDENDESCR");
records = SendSmsUtil.getRecords(pageData.getString("PHONE"), tpContent);
jsonArray.add(records);
SendSmsUtil.sendSms("121488", jsonArray, null);
PageData mes = new PageData();
mes.put("templateCode", "SMS_215820677");// 短信模板编码
mes.put("CORPINFO_ID", pageData.get("CORPINFO_ID"));// 企业id
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "time");// 存入短信模板中的参数名称
params1.put("value", pageData.getString("HIDDENDESCR"));// 存入上面参数名称所传递的值
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.multipart.MultipartFile;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
*
@ -57,6 +54,9 @@ public class AppKeyprojectPunishController extends BaseController {
@Autowired
private PersonnelManagementService personnelmanagementService;
@Autowired
private SendMessageUtil sendMessageUtil;
/**
* @param
* @throws Exception
@ -135,16 +135,18 @@ public class AppKeyprojectPunishController extends BaseController {
PageData person = new PageData();
person.put("PERSONNELMANAGEMENT_ID", pd.getString("PERSONNELMANAGEMENT_ID"));
person = personnelmanagementService.findById(person);
// outSource.get("OUTSOURCED_NAME")
JSONArray jsonArray = new JSONArray();
//接受返回结果
JSONObject records = new JSONObject();
//定义替换参数
JSONObject tpContent = new JSONObject();
tpContent.put("REASON", pd.getString("REASON"));
records = SendSmsUtil.getRecords(person.getString("PHONENUM"), tpContent);
jsonArray.add(records);
SendSmsUtil.sendSms("121490", jsonArray, null);
PageData mes = new PageData();
mes.put("templateCode", "SMS_215820677");// 短信模板编码
mes.put("CORPINFO_ID", person.get("CORPINFO_ID"));// 企业id
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "time");// 存入短信模板中的参数名称
params1.put("value", pd.getString("REASON"));// 存入上面参数名称所传递的值
paramsList.add(params1);
sendMessageUtil.sendMessagesKeyproject(mes,person.getString("PHONENUM"), paramsList);
}
} catch (Exception e) {
e.printStackTrace();

View File

@ -118,6 +118,40 @@ public class SendMessageUtil {
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

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>
</choose>
</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 )
union
(select
@ -1550,6 +1553,106 @@
and
f.CORPINFO_ID = #{pd.CORPINFO_ID}
</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 != ''">
and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USERNAME}),'%')
</if>
@ -1562,10 +1665,10 @@
<if test="pd.STATUS != null and pd.STATUS != ''"><!-- 关键词检索 -->
<choose>
<when test='pd.STATUS=="1"'>
AND getCheckedNum(f.LISTMANAGER_ID) &gt; 0
AND getStandardCheckedNum(f.CUSTOM_ID) &gt; 0
</when>
<when test='pd.STATUS=="0"'>
AND getCheckedNum(f.LISTMANAGER_ID) = 0
AND getStandardCheckedNum(f.CUSTOM_ID) = 0
</when>
<otherwise>
</otherwise>
@ -1581,6 +1684,9 @@
</otherwise>
</choose>
</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 )
</select>

View File

@ -97,7 +97,10 @@
and bhci.ISDELETE = 0
and f.COMMON_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 != ''"><!-- 关键词检索 -->
and
(

View File

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

View File

@ -218,10 +218,15 @@
</update>
<select id="getSmsList" parameterType="pd" resultType="pd">
SELECT ry.PHONENUM as PHONENUM,yh.HIDDENDESCR as HIDDENDESCR FROM BUS_KEYPROJECTCHECK t
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED gc on gc.OUTSOURCED_ID = t.OUTSOURCED_ID
SELECT
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 `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}
AND gc.IS_SMS = '0'

View File

@ -987,7 +987,7 @@
and f.VILLAGE = #{DEPT_VILLAGE}
</if>
<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>
left join BUS_HIDDEN h on f.CORPINFO_ID=h.CORPINFO_ID and h.ISDELETE='0'

View File

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