Browse Source

禅道上登机3的一些零碎小bug

v2
蟑螂恶霸 2 years ago
parent
commit
a73226b6da
  1. 11
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 4
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml
  3. 1
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DictDataMapper.xml
  4. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java
  5. 1
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java
  6. 9
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java
  7. 5
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

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

@ -315,12 +315,17 @@ public class AppEnforcementRegistrationController extends BaseController
// registration.setParams(params);
// return ZDResponse.success("查询成功", registration);
// }
@GetMapping( "/getByUserIdAndEnterpriseNumber/{userId}/{enterpriseNumber}")
@GetMapping( "/getByUserIdAndEnterpriseNumber/{modth}/{userId}/{enterpriseNumber}")
@ResponseBody
public ZDResponse getByUserIdAndEnterpriseNumber(@PathVariable Long userId, @PathVariable String enterpriseNumber)
public ZDResponse getByUserIdAndEnterpriseNumber(@PathVariable String modth, @PathVariable Long userId, @PathVariable String enterpriseNumber)
{
// 拿到的企业编码是加密盐的, 和登记表对不上
EnterpriseInformation enterpriseInformation = iEnterpriseInformationService.selectEnterpriseInformationBySalt(enterpriseNumber);
EnterpriseInformation enterpriseInformation = null;
if ("add".equals(modth)) {
enterpriseInformation = iEnterpriseInformationService.selectEnterpriseInformationBySalt(enterpriseNumber);
} else {
enterpriseInformation = iEnterpriseInformationService.selectEnterpriseInformationByNum(enterpriseNumber);
}
// 前端似乎没保存部门id, 所以弄个userId上来 通过userId获取其部门id
UserBean userBean = userApi.getUserByUserId(userId);
EnforcementRegistration registration = enforcementRegistrationService.getByDeptIdAndEnterpriseNumber(userBean.getDeptId(), enterpriseInformation.getEnterpriseNumber());

4
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DeptMapper.xml

@ -126,10 +126,10 @@
<select id="selectDeptList" parameterType="Dept" resultMap="DeptResult">
<include refid="selectDeptVo"/>
where d.del_flag = '0'
<if test="parentId != null and parentId != '' and parentId == '0'">
<if test='parentId != null and parentId != "" and parentId == "0"'>
AND parent_id = #{parentId} or parent_id is null
</if>
<if test="parentId != null and parentId != '' and parentId != '0'">
<if test='parentId != null and parentId != "" and parentId != "0"'>
AND parent_id = #{parentId}
</if>
<if test="deptName != null and deptName != ''">

1
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/DictDataMapper.xml

@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND status = #{status}
</if>
</where>
order by dict_sort asc
</select>
<select id="selectDictDataByType" parameterType="DictData" resultMap="DictDataResult">

1
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java

@ -18,6 +18,7 @@ public interface EnterpriseInformationMapper
* @return 企业信息登记
*/
public EnterpriseInformation selectEnterpriseInformationById(String id);
public EnterpriseInformation selectEnterpriseInformationByNum(String num);
/**
* 查询企业信息

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

@ -18,6 +18,7 @@ public interface IEnterpriseInformationService
* @return 企业信息登记
*/
public EnterpriseInformation selectEnterpriseInformationById(String id);
public EnterpriseInformation selectEnterpriseInformationByNum(String num);
/**
* 查询企业信息

9
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java

@ -86,6 +86,15 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
enterpriseInformation.setQrCodeGenerateHistory(qrCodeGenerateHistory);
return enterpriseInformation;
}
@Override
public EnterpriseInformation selectEnterpriseInformationByNum(String num)
{
EnterpriseInformation enterpriseInformation = enterpriseInformationMapper.selectEnterpriseInformationByNum(num);
QrCodeGenerateHistory qrCodeGenerateHistory =
iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryByNewest(enterpriseInformation.getEnterpriseNumber());
enterpriseInformation.setQrCodeGenerateHistory(qrCodeGenerateHistory);
return enterpriseInformation;
}
@Override
public EnterpriseInformation selectEnterpriseInformationBySalt(String salt) {

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

@ -66,6 +66,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<select id="selectEnterpriseInformationByNum" parameterType="String" resultMap="EnterpriseInformationResult">
<include refid="selectEnterpriseInformationVo"/>
where enterprise_number = #{num}
</select>
<select id="selectEnterpriseInformationBySalt" parameterType="String" resultMap="EnterpriseInformationResult">
<include refid="selectEnterpriseInformationVo"/>
where salt = #{salt}

Loading…
Cancel
Save