Browse Source

提交预警列表查询

企业用户校验
执法登记修改
投诉修改
行政检查预约查询用户修改
v3
chenrui 2 years ago
parent
commit
beec7be496
  1. 13
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 3
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseLawEnforcementController.java
  3. 8
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppLawEnforcementWarningListController.java
  4. 2
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/feign/UserApiImpl.java
  5. 37
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java
  6. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseComplaint.java
  7. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/LawEnforcementWarningList.java
  8. 19
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/LawEnforcementWarningListMapper.java
  9. 19
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ILawEnforcementWarningListService.java
  10. 113
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  11. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/LawEnforcementWarningListServiceImpl.java
  12. 18
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  13. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  14. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseComplaintMapper.xml
  15. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml
  16. 20
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/LawEnforcementWarningListMapper.xml

13
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java

@ -64,6 +64,17 @@ public class AppEnforcementRegistrationController extends BaseController
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList(enforcementRegistration);
return getDataTable(list);
}
/**
* 查询执法端-执法登记列表
*/
@GetMapping("/selectList")
@ResponseBody
public ZDResponse selectList(EnforcementRegistration enforcementRegistration)
{
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationList(enforcementRegistration);
return ZDResponse.success("获取执法登录信息",list);
}
/**
* 查询执法端-执法登记列表
@ -355,7 +366,7 @@ public class AppEnforcementRegistrationController extends BaseController
/**
* 获取预警信息
*/
@RequiresPermissions("code:registration:list")
// @RequiresPermissions("code:registration:list")
@GetMapping("/queryEarlyWarning")
@ResponseBody
public ZDResponse queryEarlyWarning(EnforcementRegistration enforcementRegistration)

3
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseLawEnforcementController.java

@ -193,12 +193,13 @@ public class AppEnterpriseLawEnforcementController extends BaseController
enterpriseLawEnforcement.setUniteCheck(IdUtil.simpleUUID());
// 先单独处理主单
enterpriseLawEnforcement.setTmpDeptJson(JSON.toJSONString(enterpriseLawEnforcement.getUserObjs()));
String tmpId = enterpriseLawEnforcement.getId();
if (StringUtils.isNotEmpty(enterpriseLawEnforcement.getId())) {
resNum += enterpriseLawEnforcementService.updateEnterpriseLawEnforcement(enterpriseLawEnforcement);
enterpriseLawEnforcement.setId(null);
//查询数据变更之前的原始数据
EnterpriseLawEnforcement enterpriseLawEnforcement1 =
enterpriseLawEnforcementService.selectEnterpriseLawEnforcementById(enterpriseLawEnforcement.getId());
enterpriseLawEnforcementService.selectEnterpriseLawEnforcementById(tmpId);
//短信通知,限制为执法时间变更
if(!enterpriseLawEnforcement1.getCheckTime().equals(enterpriseLawEnforcement.getCheckItem())){
// 新增默认下发短信

8
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppLawEnforcementWarningListController.java

@ -62,6 +62,14 @@ public class AppLawEnforcementWarningListController extends BaseController
List<LawEnforcementWarningList> list = lawEnforcementWarningListService.selectLawEnforcementWarningListList(lawEnforcementWarningList);
return getDataTable(list);
}
@GetMapping("/queryListByEnterpriseNumber")
@ResponseBody
public ZDResponse queryListByEnterpriseNumber(LawEnforcementWarningList lawEnforcementWarningList)
{
List<LawEnforcementWarningList> list = lawEnforcementWarningListService.selectLawEnforcementWarningByEnterpriseNumber(lawEnforcementWarningList);
return ZDResponse.success("获取当前企业本月预警信息",list);
}
/**
* 新增执法预警列表

2
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/feign/UserApiImpl.java

@ -353,7 +353,7 @@ public class UserApiImpl implements UserApi {
@Override
public String checkClientLoginNameUnique(String loginName, Integer userSource) {
return iUserService.checkLoginNameUnique(loginName);
return iUserService.checkClientLoginNameUnique(loginName,userSource);
}
@Override

37
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java

@ -85,6 +85,19 @@ public class EnforcementInspectionProgram extends BaseDomain
* 日期快捷查询 1 本月 2 本季度 3 本年 4 本周
*/
private Integer dateType;
/**
* 日期类型 1 年度 2 季度 3 月度
*/
private String timeType;
/**
* 月度
*/
private String mouth;
/**
* 季度
*/
private String quarter;
/**
* 文件对象
@ -266,6 +279,30 @@ public class EnforcementInspectionProgram extends BaseDomain
this.searchType = searchType;
}
public String getTimeType() {
return timeType;
}
public void setTimeType(String timeType) {
this.timeType = timeType;
}
public String getMouth() {
return mouth;
}
public void setMouth(String mouth) {
this.mouth = mouth;
}
public String getQuarter() {
return quarter;
}
public void setQuarter(String quarter) {
this.quarter = quarter;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseComplaint.java

@ -71,6 +71,11 @@ public class EnterpriseComplaint extends BaseDomain
*/
private String complaintDepartmentIds;
/**
* 投诉类型 1 联合执法投诉
*/
private Integer complaintType;
public String getEnforcementTime() {
return enforcementTime;
}
@ -333,6 +338,13 @@ public class EnterpriseComplaint extends BaseDomain
this.complaintDepartmentIds = complaintDepartmentIds;
}
public Integer getComplaintType() {
return complaintType;
}
public void setComplaintType(Integer complaintType) {
this.complaintType = complaintType;
}
@Override
public String toString() {

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/LawEnforcementWarningList.java

@ -66,6 +66,10 @@ public class LawEnforcementWarningList extends BaseDomain
* 结束时间
*/
private String endTime;
/**
* 是否展示
*/
private Boolean show = false;
public void setId(String id)
@ -184,6 +188,14 @@ public class LawEnforcementWarningList extends BaseDomain
this.endTime = endTime;
}
public Boolean getShow() {
return show;
}
public void setShow(Boolean show) {
this.show = show;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

19
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/LawEnforcementWarningListMapper.java

@ -17,7 +17,7 @@ public interface LawEnforcementWarningListMapper
* @param id 执法预警列表ID
* @return 执法预警列表
*/
public LawEnforcementWarningList selectLawEnforcementWarningListById(String id);
LawEnforcementWarningList selectLawEnforcementWarningListById(String id);
/**
* 查询执法预警列表列表
@ -25,7 +25,14 @@ public interface LawEnforcementWarningListMapper
* @param lawEnforcementWarningList 执法预警列表
* @return 执法预警列表集合
*/
public List<LawEnforcementWarningList> selectLawEnforcementWarningListList(LawEnforcementWarningList lawEnforcementWarningList);
List<LawEnforcementWarningList> selectLawEnforcementWarningListList(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 查询企业预警信息
* @param lawEnforcementWarningList
* @return
*/
List<LawEnforcementWarningList> selectLawEnforcementWarningByEnterpriseNumber(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 新增执法预警列表
@ -33,7 +40,7 @@ public interface LawEnforcementWarningListMapper
* @param lawEnforcementWarningList 执法预警列表
* @return 结果
*/
public int insertLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
int insertLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 修改执法预警列表
@ -41,7 +48,7 @@ public interface LawEnforcementWarningListMapper
* @param lawEnforcementWarningList 执法预警列表
* @return 结果
*/
public int updateLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
int updateLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 删除执法预警列表
@ -49,7 +56,7 @@ public interface LawEnforcementWarningListMapper
* @param id 执法预警列表ID
* @return 结果
*/
public int deleteLawEnforcementWarningListById(String id);
int deleteLawEnforcementWarningListById(String id);
/**
* 批量删除执法预警列表
@ -57,5 +64,5 @@ public interface LawEnforcementWarningListMapper
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteLawEnforcementWarningListByIds(String[] ids);
int deleteLawEnforcementWarningListByIds(String[] ids);
}

19
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/ILawEnforcementWarningListService.java

@ -17,7 +17,7 @@ public interface ILawEnforcementWarningListService
* @param id 执法预警列表ID
* @return 执法预警列表
*/
public LawEnforcementWarningList selectLawEnforcementWarningListById(String id);
LawEnforcementWarningList selectLawEnforcementWarningListById(String id);
/**
* 查询执法预警列表列表
@ -25,7 +25,14 @@ public interface ILawEnforcementWarningListService
* @param lawEnforcementWarningList 执法预警列表
* @return 执法预警列表集合
*/
public List<LawEnforcementWarningList> selectLawEnforcementWarningListList(LawEnforcementWarningList lawEnforcementWarningList);
List<LawEnforcementWarningList> selectLawEnforcementWarningListList(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 查询企业预警信息
* @param lawEnforcementWarningList
* @return
*/
List<LawEnforcementWarningList> selectLawEnforcementWarningByEnterpriseNumber(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 新增执法预警列表
@ -33,7 +40,7 @@ public interface ILawEnforcementWarningListService
* @param lawEnforcementWarningList 执法预警列表
* @return 结果
*/
public int insertLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
int insertLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 修改执法预警列表
@ -41,7 +48,7 @@ public interface ILawEnforcementWarningListService
* @param lawEnforcementWarningList 执法预警列表
* @return 结果
*/
public int updateLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
int updateLawEnforcementWarningList(LawEnforcementWarningList lawEnforcementWarningList);
/**
* 批量删除执法预警列表
@ -49,7 +56,7 @@ public interface ILawEnforcementWarningListService
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteLawEnforcementWarningListByIds(String ids);
int deleteLawEnforcementWarningListByIds(String ids);
/**
* 删除执法预警列表信息
@ -57,5 +64,5 @@ public interface ILawEnforcementWarningListService
* @param id 执法预警列表ID
* @return 结果
*/
public int deleteLawEnforcementWarningListById(String id);
int deleteLawEnforcementWarningListById(String id);
}

113
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java

@ -264,6 +264,10 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
RuleList ruleList = new RuleList();
ruleList.setStatus(0);
List<RuleList> ruleLists = ruleListService.selectRuleListList(ruleList);
//企业预警
List<EnforceRegCount> qyWarnList = new ArrayList<>();
//执法预警
List<EnforceRegCount> zfWarnList = new ArrayList<>();
for (RuleList list : ruleLists) {
// 先获取规则
RuleItemList ruleItem = new RuleItemList();
@ -273,70 +277,77 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
// 根据规则作为条件查询符合要求的数据
List<EnforceRegCount> regList = new ArrayList<>();
for (RuleItemList rule : ruleItemLists) {
List<EnforceRegCount> tmpList = new ArrayList<>();
if(list.getRuleCode().equals("zf_warn")){
String time = getTime(rule.getCycleTime().intValue());
String[] timeArr = time.split(",");
tmpList = enforcementRegistrationMapper.countMentByTimeLawNew(timeArr[0],timeArr[1]);
tmpList.forEach(res ->{
List<EnforceRegCount> enforceRegCounts = enforcementRegistrationMapper.countMentByTimeLawNew(timeArr[0], timeArr[1]);
enforceRegCounts.forEach(res ->{
res.setBeginTime(timeArr[0]);
res.setEndTime(timeArr[1]);
});
zfWarnList.addAll(enforceRegCounts);
}else if (list.getRuleCode().equals("qy_warn")){
String time = getTime(rule.getCycleTime().intValue());
String[] timeArr = time.split(",");
tmpList = enforcementRegistrationMapper.countMentByTimeQyNew(timeArr[0],timeArr[1]);
tmpList.forEach(res ->{
res.setBeginTime(timeArr[0]);
res.setEndTime(timeArr[1]);
});
}else {
tmpList = enforcementRegistrationMapper.countMentByTime2(rule.getCycleTime(), searchValue);
List<EnforceRegCount> qyWarnList1 = enforcementRegistrationMapper.countMentByTimeQyNew(timeArr[0], timeArr[1]);
if(qyWarnList1.size() > 0){
qyWarnList1.forEach(res ->{
res.setBeginTime(timeArr[0]);
res.setEndTime(timeArr[1]);
});
qyWarnList.addAll(qyWarnList1);
}
}
regList.addAll(tmpList);
}
// 对数据进行组合
Map<String, EnforceRegCount> maxItems = regList.stream()
.collect(Collectors.groupingBy(
EnforceRegCount::getLawEnforcementId,
Collectors.collectingAndThen(
Collectors.maxBy(Comparator.comparingInt(EnforceRegCount::getNum)),
Optional::get)));
Date nowDate = DateUtils.getNowDate();
// List<LawEnforcementWarningList> lawEnforcementWarningLists = new ArrayList<>();
Iterator<Map.Entry<String, EnforceRegCount>> iterator = maxItems.entrySet().iterator();
while (iterator.hasNext()) {
EnforceRegCount reg = iterator.next().getValue();
// 判断预警级别
for (RuleItemList rule : ruleItemLists) {
// if (reg.getNum() >= rule.getExistAlarm() && reg.getNum() <= rule.getExistAlarmEnd()) {
if (reg.getNum() >= rule.getExistAlarm()) {
reg.setLevel(rule.getAlarmType());
// LawEnforcementWarningList lawEnforcementWarningList = new LawEnforcementWarningList();
// lawEnforcementWarningList.setId(IdUtil.simpleUUID());
// //获取执法次数
// lawEnforcementWarningList.setEnforcementNumber(reg.getNum());
// //企业名称
// lawEnforcementWarningList.setEnterpriseName(reg.getLawEnforcement());
// //企业统一信用代码
// lawEnforcementWarningList.setEnterpriseNumber(reg.getEnterpriseNumber());
// //预警原因
// lawEnforcementWarningList.setWarningCause(""+ reg.getNum() +"");
// //预警时间
// lawEnforcementWarningList.setWarningTime(nowDate);
// //创建时间
// lawEnforcementWarningList.setCreateTime(nowDate);
if(list.getRuleCode().equals("zf_warn")){
reg.setWarnType(0);
}else if (list.getRuleCode().equals("qy_warn")){
reg.setWarnType(1);
if(zfWarnList.size() > 0){
//企业需分别 对数据进行组合
Map<String, EnforceRegCount> zfMaxItems = zfWarnList.stream()
.collect(Collectors.groupingBy(
EnforceRegCount::getEnterpriseNumber,
Collectors.collectingAndThen(
Collectors.maxBy(Comparator.comparingInt(EnforceRegCount::getNum)),
Optional::get)));
Iterator<Map.Entry<String, EnforceRegCount>> iterator = zfMaxItems.entrySet().iterator();
while (iterator.hasNext()) {
EnforceRegCount reg = iterator.next().getValue();
// 判断预警级别
for (RuleItemList rule : ruleItemLists) {
if (reg.getNum() >= rule.getExistAlarm()) {
reg.setLevel(rule.getAlarmType());
if(list.getRuleCode().equals("zf_warn")){
reg.setWarnType(0);
results.add(reg);
}
break;
}
}
}
}
if(qyWarnList.size() > 0){
//企业需分别 对数据进行组合
Map<String, EnforceRegCount> qyMaxItems = qyWarnList.stream()
.collect(Collectors.groupingBy(
EnforceRegCount::getEnterpriseNumber,
Collectors.collectingAndThen(
Collectors.maxBy(Comparator.comparingInt(EnforceRegCount::getNum)),
Optional::get)));
Iterator<Map.Entry<String, EnforceRegCount>> qyIterator = qyMaxItems.entrySet().iterator();
while (qyIterator.hasNext()) {
EnforceRegCount reg = qyIterator.next().getValue();
// 判断预警级别
for (RuleItemList rule : ruleItemLists) {
if (reg.getNum() >= rule.getExistAlarm()) {
reg.setLevel(rule.getAlarmType());
if(list.getRuleCode().equals("qy_warn")){
reg.setWarnType(1);
results.add(reg);
}
break;
}
//存储告警信息
// lawEnforcementWarningLists.add(lawEnforcementWarningList);
results.add(reg);
break;
}
}
}

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/LawEnforcementWarningListServiceImpl.java

@ -46,6 +46,12 @@ public class LawEnforcementWarningListServiceImpl implements ILawEnforcementWarn
return lawEnforcementWarningListMapper.selectLawEnforcementWarningListList(lawEnforcementWarningList);
}
@Override
public List<LawEnforcementWarningList> selectLawEnforcementWarningByEnterpriseNumber(LawEnforcementWarningList lawEnforcementWarningList) {
return lawEnforcementWarningListMapper.selectLawEnforcementWarningByEnterpriseNumber(lawEnforcementWarningList);
}
/**
* 新增执法预警列表
*

18
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

@ -20,13 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="isPublish" column="is_publish" />
<result property="bureauDeptId" column="bureau_dept_id" />
<result property="bureauDeptName" column="bureau_dept_name" />
<result property="timeType" column="time_type" />
<result property="mouth" column="mouth" />
<result property="quarter" column="quarter" />
</resultMap>
<sql id="selectEnforcementInspectionProgramVo">
select id, plan_year, plan_name, enforcement_department,
select
id, plan_year, plan_name, enforcement_department,
enforcement_department_id, enforcement_time, enforcement_area,
create_time, create_by, user_id, dept_id, is_delete,is_publish,
bureau_dept_id,bureau_dept_name from enforcement_inspection_program
bureau_dept_id,bureau_dept_name,time_type,mouth,quarter
from enforcement_inspection_program
</sql>
<select id="selectEnforcementInspectionProgramList" parameterType="EnforcementInspectionProgram" resultMap="EnforcementInspectionProgramResult">
@ -108,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isPublish != null ">is_publish,</if>
<if test="bureauDeptName != null and bureauDeptName != ''"> bureau_dept_name,</if>
<if test="bureauDeptId != null and bureauDeptId != ''"> bureau_dept_id,</if>
<if test="timeType != null and timeType != ''"> time_type,</if>
<if test="mouth != null and mouth != ''"> mouth,</if>
<if test="quarter != null and quarter != ''"> quarter,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@ -125,6 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isPublish != null ">#{isPublish},</if>
<if test="bureauDeptName != null and bureauDeptName != ''"> #{bureauDeptName},</if>
<if test="bureauDeptId != null and bureauDeptId != ''"> #{bureauDeptId},</if>
<if test="timeType != null and timeType != ''"> #{timeType},</if>
<if test="mouth != null and mouth != ''">#{mouth},</if>
<if test="quarter != null and quarter != ''"> #{quarter},</if>
</trim>
</insert>
@ -145,6 +156,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isPublish != null ">is_publish = #{isPublish},</if>
<if test="bureauDeptName != null and bureauDeptName != ''"> bureau_dept_name = #{bureauDeptName},</if>
<if test="bureauDeptId != null and bureauDeptId != ''"> bureau_dept_id = #{bureauDeptId},</if>
<if test="timeType != null and timeType != ''"> time_type = #{timeType},</if>
<if test="mouth != null and timeType != ''"> mouth = #{mouth},</if>
<if test="quarter != null and timeType != ''"> quarter = #{quarter},</if>
</trim>
where id = #{id}
</update>

8
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -96,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isComplaint != null "> and is_complaint = #{isComplaint}</if>
<if test="status != null "> and status = #{status}</if>
<if test="lawEnforcementCode != null and lawEnforcementCode != ''"> and law_enforcement_code = #{lawEnforcementCode}</if>
<if test="uniteCheck != null and uniteCheck != ''"> and unite_check = #{uniteCheck}</if>
<if test="searchValue != null and searchValue != ''">
and (law_enforcement_item_text like concat(concat('%',#{searchValue}),'%')
or law_enforcement like concat(concat('%',#{searchValue}),'%')
@ -414,8 +416,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
( SELECT enterprise_name, enterprise_number, law_enforcement_id,law_enforcement, unite_check, create_time ,
count( enterprise_number ) AS total FROM enforcement_registration
WHERE <![CDATA[ create_time >= #{beginTime} AND create_time <= #{endTime} ]]> AND law_enforcement_id IS NOT NULL GROUP BY unite_check ,law_enforcement_id ) AS t1
GROUP BY t1.law_enforcement_id
WHERE <![CDATA[ create_time >= #{beginTime} AND create_time <= #{endTime} ]]> AND law_enforcement_id IS NOT NULL GROUP BY IFNULL(unite_check, RAND()) ,law_enforcement_id ) AS t1
GROUP BY t1.law_enforcement_id,t1.enterprise_number
</select>
<select id="countMentByTimeQyNew" resultMap="EnforceRegCountResult"
resultType="com.zdxt.code.domain.EnforceRegCount">
@ -429,7 +431,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
count( enterprise_number ) AS total FROM enforcement_registration
WHERE <![CDATA[ create_time >= #{beginTime} AND create_time <= #{endTime} ]]>
AND law_enforcement_id IS NOT NULL
GROUP BY unite_check ,law_enforcement_id ) AS t1
GROUP BY IFNULL(unite_check, RAND()) ,law_enforcement_id ) AS t1
GROUP BY t1.enterprise_number
</select>

5
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseComplaintMapper.xml

@ -23,13 +23,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="complaintDepartments" column="complaint_departments" />
<result property="complaintDepartmentIds" column="complaint_department_ids" />
<result property="enforcementTime" column="enforcement_time" />
<result property="complaintType" column="complaint_type" />
</resultMap>
<sql id="selectEnterpriseComplaintVo">
select id, rel_id, enforce_type, problem_description, enterprise_address, linkman,
linkman_tel, com_or_opi, authorization, create_time, pro_wo_code,enterprise_number,
enterprise_name,status,evaluate_time,complaint_departments,complaint_department_ids,
enforcement_time
enforcement_time,complaint_type
from enterprise_complaint
</sql>
@ -76,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complaintDepartments != null and complaintDepartments != ''">complaint_departments,</if>
<if test="complaintDepartmentIds != null and complaintDepartmentIds != ''">complaint_department_ids,</if>
<if test="enforcementTime != null and enforcementTime != ''">enforcement_time,</if>
<if test="complaintType != null">complaint_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@ -94,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complaintDepartments != null and complaintDepartments != ''">#{complaintDepartments},</if>
<if test="complaintDepartmentIds != null and complaintDepartmentIds != ''">#{complaintDepartmentIds},</if>
<if test="enforcementTime != null and enforcementTime != ''">#{enforcementTime},</if>
<if test="complaintType != null">#{complaintType},</if>
</trim>
</insert>

1
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml

@ -296,6 +296,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tmpDeptJson != null and tmpDeptJson != ''">tmp_dept_json = #{tmpDeptJson},</if>
<if test="bureauDeptName != null and bureauDeptName != ''"> bureau_dept_name = #{bureauDeptName},</if>
<if test="bureauDeptId != null and bureauDeptId != ''"> bureau_dept_id = #{bureauDeptId},</if>
<if test="checkTimeOrder != null"> check_time_order = #{checkTimeOrder},</if>
</trim>
where id = #{id}
</update>

20
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/LawEnforcementWarningListMapper.xml

@ -27,7 +27,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectLawEnforcementWarningListList" parameterType="LawEnforcementWarningList" resultMap="LawEnforcementWarningListResult">
<include refid="selectLawEnforcementWarningListVo"/>
SELECT * FROM (
SELECT
id,
warning_time, warning_cause, warning_level ,
create_time, enterprise_name, enterprise_number,
enforcement_number,warn_type,enforcement_department,
enforcement_department_id,begin_time,end_time
FROM law_enforcement_warning_list
<where>
<if test="warningTime != null "> and warning_time = #{warningTime}</if>
<if test="warningLevel != null "> and warning_level = #{warningLevel}</if>
@ -49,10 +56,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test=" enforcementDepartmentId != null and enforcementDepartmentId != ''">
enforcement_department_id = #{enforcementDepartmentId},
</if>
ORDER BY warning_level ASC,create_time DESC LIMIT 1000000000
</where>
order by warning_level,warning_time desc
) t GROUP BY t.enterprise_number
</select>
<select id="selectLawEnforcementWarningByEnterpriseNumber" parameterType="LawEnforcementWarningList"
resultMap="LawEnforcementWarningListResult">
<include refid="selectLawEnforcementWarningListVo"/>
where enterprise_number = #{enterpriseNumber}
AND DATE_FORMAT(create_time,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m')
AND warn_type = #{warnType}
order by create_time desc
</select>
<select id="selectLawEnforcementWarningListById" parameterType="String" resultMap="LawEnforcementWarningListResult">
<include refid="selectLawEnforcementWarningListVo"/>
where id = #{id}

Loading…
Cancel
Save