Browse Source

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

v2
chenrui 2 years ago
parent
commit
3f14f7c4b6
  1. 9
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 6
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppThirdLoginController.java
  3. 10
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application-dev.yml
  4. 12
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application-druid.yml
  5. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementRegistrationServiceImpl.java
  6. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  7. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Zqyjjdm137344Mapper.xml

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

@ -39,6 +39,7 @@ public class AppEnforcementRegistrationController extends BaseController
private IEnforcementRegistrationService enforcementRegistrationService;
@Autowired private ILinkageDictService iLinkageDictService;
@Autowired private IEnterpriseComplaintService enterpriseComplaintService;
@Autowired private IEnterpriseInformationService iEnterpriseInformationService;
@Autowired private IZqyjjdm137344Service iZqyjjdm137344Service;
@Autowired private UserApi userApi;
@ -296,15 +297,17 @@ public class AppEnforcementRegistrationController extends BaseController
@ResponseBody
public ZDResponse getByUserIdAndEnterpriseNumber(@PathVariable Long userId, @PathVariable String enterpriseNumber)
{
// 拿到的企业编码是加密盐的, 和登记表对不上
EnterpriseInformation enterpriseInformation = iEnterpriseInformationService.selectEnterpriseInformationBySalt(enterpriseNumber);
// 前端似乎没保存部门id, 所以弄个userId上来 通过userId获取其部门id
UserBean userBean = userApi.getUserByUserId(userId);
EnforcementRegistration registration = enforcementRegistrationService.getByDeptIdAndEnterpriseNumber(userBean.getDeptId(), enterpriseNumber);
EnforcementRegistration registration = enforcementRegistrationService.getByDeptIdAndEnterpriseNumber(userBean.getDeptId(), enterpriseInformation.getEnterpriseNumber());
if (null!=registration && StringUtils.isNotEmpty(registration.getId())) {
Map<String, Object> params = new HashMap<>();
LinkageDict tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementItem());
params.put("lawEnforcementItemText", null != tmp ? tmp.getTitle() : "");
tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementBasis());
params.put("lawEnforcementBasisText", null != tmp ? tmp.getTitle() : "");
// tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementBasis());
// params.put("lawEnforcementBasisText", null != tmp ? tmp.getTitle() : "");
registration.setParams(params);
return ZDResponse.success("查询成功", registration);
}

6
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppThirdLoginController.java

@ -23,6 +23,7 @@ import com.zdxt.domain.auth.User;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Hex;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -94,7 +95,7 @@ public class AppThirdLoginController {
String secretKey = params.get("secretKey");
//解密
secretKey = AesHelper.desEncrypt(secretKey);
// UsernamePasswordToken token = new UsernamePasswordToken(username, password, false);
// UsernamePasswordToken token = new UsernamePasswordToken(secretName, secretKey, false);
UserToken token = new UserToken(secretName, secretKey, LoginType.PASSWORD);
Subject subject = SecurityUtils.getSubject();
subject.login(token);
@ -104,8 +105,7 @@ public class AppThirdLoginController {
} catch (Exception e) {
e.printStackTrace();
}
return ZDResponse.success();
return ZDResponse.error("登入失败");
}

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: ENC(nCzTixQexFdZNVhREOMMps2pNJ5gxrZb)
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:

12
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/application-druid.yml

@ -6,13 +6,13 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://146.56.223.227:3306/zfjd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: ENC(XZ0cNb5wfN9GkTEq+SgVNA==)
password: ENC(+bxT7W35PF0k/5FZBYV0uwFLN+I9kZsF)
# url: jdbc:mysql://146.56.223.227:3306/zfjd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: ENC(XZ0cNb5wfN9GkTEq+SgVNA==)
# password: ENC(+bxT7W35PF0k/5FZBYV0uwFLN+I9kZsF)
# url: ENC(v3oHIZvpj5ZRTcLc41PnMXUVZbXK7dp+IKwsOlJ2bRUf5E5bagEjlB3qNwT7KiAnX3+ugTUeKWt1cVPh1iVLlQE1ELVNILu6k0X4/uH9ao53b4pLlyJsim67HozUikmKDQ/wDMxVUSkBW21g6jcKeEzXgSphxUQvPz/L8KJzzHJvkpDarGwYUZH+sV1VnSkHCHpPqW9wkbD/AN8K+iNiLw==)
# username: ENC(E5mY10bkGFBgN1Pljgzggg==)
# password: ENC(oqD1IasQS57qOeOHFtBdAAemGwJ2I7BV)
url: ENC(v3oHIZvpj5ZRTcLc41PnMXUVZbXK7dp+IKwsOlJ2bRUf5E5bagEjlB3qNwT7KiAnX3+ugTUeKWt1cVPh1iVLlQE1ELVNILu6k0X4/uH9ao53b4pLlyJsim67HozUikmKDQ/wDMxVUSkBW21g6jcKeEzXgSphxUQvPz/L8KJzzHJvkpDarGwYUZH+sV1VnSkHCHpPqW9wkbD/AN8K+iNiLw==)
username: ENC(E5mY10bkGFBgN1Pljgzggg==)
password: ENC(oqD1IasQS57qOeOHFtBdAAemGwJ2I7BV)
# 从库数据源
slave:
# 从数据源开关/默认关闭

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

@ -204,7 +204,7 @@ public class EnforcementRegistrationServiceImpl implements IEnforcementRegistrat
});
}
//判断数据修改成功且状态为1时同步推送至
if(i > 0 && enforcementRegistration.getStatus() == 1){
if(i > 0 && null != enforcementRegistration.getStatus() && enforcementRegistration.getStatus() == 1){
//TODO 提交相对应的数据到后台管理,同时绑定对应的商户。相关的执法数据推送到其它平台
}

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

@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="lawEnforcementItem" column="law_enforcement_item" />
<result property="lawEnforcementItemText" column="law_enforcement_item_text" />
<result property="lawEnforcementBasis" column="law_enforcement_basis" />
<result property="lawEnforcementBasisText" column="law_enforcement_basis_text" />
<result property="remark" column="remark" />
<result property="reslut" column="reslut" />
<result property="userId" column="user_id" />
@ -56,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
enterprise_number, enforcement_time, create_time, create_by, law_enforcer, law_enforcer_id,
law_enforcer_tel, law_enforcer_two, law_enforcer_id_two, law_enforcer_tel_two, subsidiaryer,
subsidiaryer_id, subsidiaryer_tel, law_enforcement_item, law_enforcement_item_text,
law_enforcement_basis, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,
law_enforcement_basis, law_enforcement_basis_text, remark, reslut, user_id, dept_id, is_delete, status, law_enforcement_code,
is_complaint,is_submit, unite_check,check_css, enforce_reason, law_field,check_category,
bureau_dept_id,bureau_dept_name
from enforcement_registration
@ -82,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lawEnforcementItem != null and lawEnforcementItem != ''"> and law_enforcement_item = #{lawEnforcementItem}</if>
<if test="lawEnforcementItemText != null and lawEnforcementItemText != ''"> and law_enforcement_item_text like concat('%', #{lawEnforcementItemText,jdbcType=VARCHAR}, '%')</if>
<if test="lawEnforcementBasis != null and lawEnforcementBasis != ''"> and law_enforcement_basis = #{lawEnforcementBasis}</if>
<if test="lawEnforcementBasisText != null and lawEnforcementBasisText != ''"> and law_enforcement_basis_text = #{lawEnforcementBasisText}</if>
<if test="reslut != null "> and reslut = #{reslut}</if>
<if test="isSubmit != null "> and is_submit = #{isSubmit}</if>
<if test="userId != null "> and user_id = #{userId}</if>
@ -161,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lawEnforcementItem != null and lawEnforcementItem != ''">law_enforcement_item,</if>
<if test="lawEnforcementItemText != null and lawEnforcementItemText != ''">law_enforcement_item_text,</if>
<if test="lawEnforcementBasis != null and lawEnforcementBasis != ''">law_enforcement_basis,</if>
<if test="lawEnforcementBasisText != null and lawEnforcementBasisText != ''">law_enforcement_basis_text,</if>
<if test="enforce != null and enforce != ''">enforce,</if>
<if test="checkCss != null and checkCss != ''">check_css,</if>
<if test="enforceReason != null and enforceReason != ''">enforce_reason,</if>
@ -201,6 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lawEnforcementItem != null and lawEnforcementItem != ''">#{lawEnforcementItem},</if>
<if test="lawEnforcementItemText != null and lawEnforcementItemText != ''">#{lawEnforcementItemText},</if>
<if test="lawEnforcementBasis != null and lawEnforcementBasis != ''">#{lawEnforcementBasis},</if>
<if test="lawEnforcementBasisText != null and lawEnforcementBasisText != ''">#{lawEnforcementBasisText},</if>
<if test="enforce != null and enforce != ''">#{enforce},</if>
<if test="checkCss != null and checkCss != ''">#{checkCss},</if>
<if test="enforceReason != null and enforceReason != ''">#{enforceReason},</if>
@ -244,6 +248,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lawEnforcementItem != null and lawEnforcementItem != ''">law_enforcement_item = #{lawEnforcementItem},</if>
<if test="lawEnforcementItemText != null and lawEnforcementItemText != ''">law_enforcement_item_text = #{lawEnforcementItemText},</if>
<if test="lawEnforcementBasis != null and lawEnforcementBasis != ''">law_enforcement_basis = #{lawEnforcementBasis},</if>
<if test="lawEnforcementBasisText != null and lawEnforcementBasisText != ''">law_enforcement_basis_text = #{lawEnforcementBasisText},</if>
<if test="enforce != null and enforce != ''">enforce = #{enforce},</if>
<if test="checkCss != null and checkCss != ''">check_css = #{checkCss},</if>
<if test="enforceReason != null and enforceReason != ''">enforce_reason = #{enforceReason},</if>

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/Zqyjjdm137344Mapper.xml

@ -29,20 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectZqyjjdmList" parameterType="string" resultMap="ZqyjjdmResult">
<include refid="selectZqyjjdmVo"/>
select id, gist_section, power_id, gist_code, law_name, gist_type, gist_series, gist_chapter, content, gist_catalog, gist_item, gist_fund, gist_strip, data_place, ins, updatestatus, updatetime from zqyjjdm137344
<where>
<if test="searchValue != null and searchValue != ''">
and ( CONTENT like concat(concat('%',#{searchValue}),'%')
or GIST_STRIP like concat(concat('%',#{searchValue}),'%')
or GIST_FUND like concat(concat('%',#{searchValue}),'%')
or GIST_ITEM like concat(concat('%',#{searchValue}),'%')
or GIST_CATALOG like concat(concat('%',#{searchValue}),'%')
or GIST_CHAPTER like concat(concat('%',#{searchValue}),'%')
or GIST_SERIES like concat(concat('%',#{searchValue}),'%')
or LAW_NAME like concat(concat('%',#{searchValue}),'%')
)
and LAW_NAME like concat(concat('%',#{searchValue}),'%')
</if>
</where>
group by LAW_NAME
</select>
<select id="getZqyjjdmById" parameterType="string" resultMap="ZqyjjdmResult">

Loading…
Cancel
Save