Browse Source

执法人员动态多选

v2
蟑螂恶霸 2 years ago
parent
commit
6f42a796c0
  1. 11
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 22
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseComplaintController.java
  3. 13
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/feign/UserApiImpl.java
  4. 2
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/mapper/UserMapper.java
  5. 8
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml
  6. 10
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application-dev.yml
  7. 15
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java
  8. 4
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  9. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseComplaintServiceImpl.java
  10. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseComplaintMapper.xml
  11. 2
      lib/EmergencyServiceApi/emergencyAuthServiceApi/src/main/java/com/zdxt/auth/dto/UserBean.java
  12. 1
      lib/EmergencyServiceApi/emergencyAuthServiceApi/src/main/java/com/zdxt/auth/feign/UserApi.java

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

@ -302,6 +302,17 @@ public class AppEnforcementRegistrationController extends BaseController
// 前端似乎没保存部门id, 所以弄个userId上来 通过userId获取其部门id
UserBean userBean = userApi.getUserByUserId(userId);
EnforcementRegistration registration = enforcementRegistrationService.getByDeptIdAndEnterpriseNumber(userBean.getDeptId(), enterpriseInformation.getEnterpriseNumber());
// 执法人员需要展示用户名+执法码
List<UserBean> userBeans = userApi.getUserByUserIds(registration.getLawEnforcerIdTwo());
String tmpUserShow = "";
for (UserBean ub : userBeans) {
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum();
tmpUserShow += ub.getUserName() +" - "+ lawCertificateNum + ",";
}
if (tmpUserShow.length() > 0) {
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
}
registration.setLawEnforcer2Show(tmpUserShow);
if (null!=registration && StringUtils.isNotEmpty(registration.getId())) {
Map<String, Object> params = new HashMap<>();
LinkageDict tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementItem());

22
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseComplaintController.java

@ -1,11 +1,13 @@
package com.zdxt.app.controller;
import com.alibaba.fastjson.JSONObject;
import com.zdxt.code.domain.EnterpriseComplaint;
import com.zdxt.code.domain.MssqAddOrder;
import com.zdxt.code.service.IEnterpriseComplaintService;
import com.zdxt.code.service.MssqApiService;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.StringUtils;
import com.zdxt.common.util.TableDataInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
@ -13,7 +15,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 企业执法-在线投诉Controller
@ -105,6 +109,24 @@ public class AppEnterpriseComplaintController extends BaseController {
public ZDResponse queryById(String id)
{
EnterpriseComplaint enterpriseComplaint = enterpriseComplaintService.selectEnterpriseComplaintById(id);
if (StringUtils.isNotEmpty(enterpriseComplaint.getProWoCode())) {
MssqAddOrder mparams = new MssqAddOrder();
mparams.setProWoCode(enterpriseComplaint.getProWoCode());
String resStr = null;
try {
resStr = mssqApiService.mssqQueryEndInfo(mparams);
JSONObject resObj = JSONObject.parseObject(resStr);
Map<String, Object> resMap = new HashMap<>();
if ("0".equals(resObj.getString("resultCode"))) {
resMap.put("res", resObj.getJSONObject("endData"));
} else {
resMap.put("res", "0");
}
enterpriseComplaint.setParams(resMap);
} catch (Exception e) {
e.printStackTrace();
}
}
return ZDResponse.success("投诉详情查询",enterpriseComplaint);
}

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

@ -1,6 +1,7 @@
package com.zdxt.auth.feign;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import com.zdxt.auth.common.utils.security.ShiroUtils;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.RoleBean;
@ -125,6 +126,18 @@ public class UserApiImpl implements UserApi {
return userBean;
}
@Override
public List<UserBean> getUserByUserIds(String ids) {
List<User> users = userMapper.selectUserByIds(Convert.toStrArray(ids));
List<UserBean> ubs = new ArrayList<>();
for (User user : users) {
UserBean userBean = new UserBean();
BeanUtil.copyProperties(user, userBean);
ubs.add(userBean);
}
return ubs;
}
@Override
public UserBean getUserByUserStrId(String userId) {
User user = userMapper.selectUserByStrId(userId);

2
lib/EmergencyService/zdxtEmergencyAuthService/src/main/java/com/zdxt/auth/project/system/user/mapper/UserMapper.java

@ -1,7 +1,6 @@
package com.zdxt.auth.project.system.user.mapper;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.domain.auth.User;
import org.apache.ibatis.annotations.Param;
@ -86,6 +85,7 @@ public interface UserMapper
* @return 用户对象信息
*/
public User selectUserById(Long userId);
public List<User> selectUserByIds(String[] ids);
public User selectUserByStrId(String userId);
public List<User> selectUserByDeptId(@Param("deptId") Long deptId, @Param("loginName") String loginName);

8
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml

@ -291,6 +291,14 @@
where u.user_id = #{userId}
</select>
<select id="selectUserByIds" parameterType="string" resultMap="UserResult">
<include refid="selectUserVo"/>
where u.user_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectUserByStrId" parameterType="String" resultMap="UserResult">
<include refid="selectUserVo"/>
where u.strUserId = #{userId}

10
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application-dev.yml

@ -3,12 +3,12 @@ spring:
# redis配置
redis:
database: 0
host: 10.76.108.1
port: 6379
password: zfjd@123
# host: 43.136.51.161
# host: 10.76.108.1
# port: 6379
# password: meiyoumima
# password: zfjd@123
host: 43.136.51.161
port: 6379
password: meiyoumima
timeout: 6000ms # 连接超时时长(毫秒)
lettuce:
pool:

15
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java

@ -52,7 +52,7 @@ public class EnforcementRegistration extends BaseDomain
private String lawEnforcerTwo;
/** 执法人员2ID */
private Long lawEnforcerIdTwo;
private String lawEnforcerIdTwo;
/** 执法人员2联系方式 */
private String lawEnforcerTelTwo;
@ -157,7 +157,16 @@ public class EnforcementRegistration extends BaseDomain
private List fileListObj;
/** 超时几天(临时用的, 判断检查时间是否超过5天) */
private long outTimeDayNum;
// 用来展示执法人员名称 - 执法编码的
private String lawEnforcer2Show;
public String getLawEnforcer2Show() {
return lawEnforcer2Show;
}
public void setLawEnforcer2Show(String lawEnforcer2Show) {
this.lawEnforcer2Show = lawEnforcer2Show;
}
/**
* 执法领域
@ -354,11 +363,11 @@ public class EnforcementRegistration extends BaseDomain
this.lawEnforcerTwo = lawEnforcerTwo;
}
public Long getLawEnforcerIdTwo() {
public String getLawEnforcerIdTwo() {
return lawEnforcerIdTwo;
}
public void setLawEnforcerIdTwo(Long lawEnforcerIdTwo) {
public void setLawEnforcerIdTwo(String lawEnforcerIdTwo) {
this.lawEnforcerIdTwo = lawEnforcerIdTwo;
}

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

@ -79,8 +79,8 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
enforcementRegistration.setLawEnforcer(enforcementRegistration.getLawEnforcer());
}
if(enforcementRegistration.getLawEnforcerIdTwo() != null){
UserBean user =
userApi.getUserByUserId(enforcementRegistration.getLawEnforcerIdTwo());
List<UserBean> users =
userApi.getUserByUserIds(enforcementRegistration.getLawEnforcerIdTwo());
// enforcementRegistration.setLawEnforcerTwo(enforcementRegistration.getLawEnforcerTwo() + " " + user.getLawCertificateNum() );
enforcementRegistration.setLawEnforcerTwo(enforcementRegistration.getLawEnforcerTwo());
}

1
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseComplaintServiceImpl.java

@ -117,7 +117,6 @@ public class EnterpriseComplaintServiceImpl implements IEnterpriseComplaintServi
}
String jsonStr = mssqApiService.addMssqOrder(mssqAddOrder);
JSONObject json = JSONObject.parseObject(jsonStr);
json = JSONObject.parseObject(json.getString("data"));
String proWoCode = json.getString("proWoCode");
enterpriseComplaint.setProWoCode(proWoCode);
enterpriseComplaintMapper.updateEnterpriseComplaint(enterpriseComplaint);

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

@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="linkman != null and linkman != ''"> and linkman = #{linkman}</if>
<if test="linkmanTel != null and linkmanTel != ''"> and linkman_tel = #{linkmanTel}</if>
</where>
ORDER BY create_time DESC
</select>
<select id="selectEnterpriseComplaintById" parameterType="String" resultMap="EnterpriseComplaintResult">

2
lib/EmergencyServiceApi/emergencyAuthServiceApi/src/main/java/com/zdxt/auth/dto/UserBean.java

@ -75,7 +75,7 @@ public class UserBean implements Serializable {
private String phonenumber;
/**
* 手机号码
* 执法证件号
*/
@ApiModelProperty("执法证件号")
private String lawCertificateNum;

1
lib/EmergencyServiceApi/emergencyAuthServiceApi/src/main/java/com/zdxt/auth/feign/UserApi.java

@ -33,6 +33,7 @@ public interface UserApi {
@GetMapping("/getUserByUserId")
@ApiOperation("获取用户管理信息列表")
public UserBean getUserByUserId(Long userId);
public List<UserBean> getUserByUserIds(String ids);
public UserBean getUserByUserStrId(String userId);
@GetMapping("/getUserByDeptId")

Loading…
Cancel
Save