Commit 372a120b authored by chenzhao's avatar chenzhao

增加根据检验人员查询回填联系电话

parent 02fd1964
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
tzjia.application_date, tzjia.application_date,
tzjia.accept_date, tzjia.accept_date,
tzjia.inspection_charge_phone, tzjia.inspection_charge_phone,
tbei2.use_contact as inspectionChargePerson, tui.name as inspectionChargePerson,
tbei1.use_unit AS applicationUnitName, tbei1.use_unit AS applicationUnitName,
tbei.use_unit AS inspectionUnitName, tbei.use_unit AS inspectionUnitName,
tzjia.status, tzjia.status,
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
tz_jyjc_inspection_application AS tzjia tz_jyjc_inspection_application AS tzjia
LEFT JOIN tz_base_enterprise_info tbei ON tbei.use_code = tzjia.application_unit_code LEFT JOIN tz_base_enterprise_info tbei ON tbei.use_code = tzjia.application_unit_code
LEFT JOIN tz_base_enterprise_info tbei1 ON tbei1.use_code = tzjia.inspection_unit_code LEFT JOIN tz_base_enterprise_info tbei1 ON tbei1.use_code = tzjia.inspection_unit_code
LEFT JOIN tz_base_enterprise_info tbei2 ON tbei2.sequence_nbr = tzjia.inspection_charge_person LEFT JOIN tzs_user_info tui ON tui.sequence_nbr = tzjia.inspection_charge_person
LEFT JOIN cb_data_dictionary cdd ON cdd.code = tzjia.equip_classify LEFT JOIN cb_data_dictionary cdd ON cdd.code = tzjia.equip_classify
LEFT JOIN cb_data_dictionary cdd1 ON cdd1.code = tzjia.inspection_classify LEFT JOIN cb_data_dictionary cdd1 ON cdd1.code = tzjia.inspection_classify
LEFT JOIN cb_data_dictionary cdd2 ON cdd2.code = tzjia.status and cdd2.type = 'JYLCZT' LEFT JOIN cb_data_dictionary cdd2 ON cdd2.code = tzjia.status and cdd2.type = 'JYLCZT'
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
and biz_type = #{bizType} and biz_type = #{bizType}
</if> </if>
</where> </where>
order by tzjia.application_date desc
</select> </select>
<select id="listByCategory" <select id="listByCategory"
resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel"> resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationEquipModel">
......
package com.yeejoin.amos.boot.module.jyjc.biz.controller; package com.yeejoin.amos.boot.module.jyjc.biz.controller;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl; import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
...@@ -13,7 +14,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -13,7 +14,10 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.Collections;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author system_generator * @author system_generator
...@@ -39,6 +43,20 @@ public class CommonController extends BaseController { ...@@ -39,6 +43,20 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode)); return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/getUserPhonesByPersonCode")
@ApiOperation(httpMethod = "GET", value = "根据公司的unitCode获取检测检验人员列表", notes = "根据公司的unitCode获取检测检验人员列表")
public ResponseModel<Map<String,Object>> getUserPhonesByPersonCode(@RequestParam String unitCode) {
List<TzsUserInfo> userPhones = commonserviceImpl.getUserPhonesByPersonCode(unitCode);
if (CollectionUtils.isEmpty(userPhones)){
return null;
}
Map<String,Object> map = new HashMap<>();
map.put("phone",userPhones.get(0).getPhone() == null?"":userPhones.get(0).getPhone());
return ResponseHelper.buildResponse(map);
}
/** /**
* 查询检验检测机构列表(基本信息及联系人) * 查询检验检测机构列表(基本信息及联系人)
* *
......
...@@ -49,6 +49,14 @@ public class CommonserviceImpl { ...@@ -49,6 +49,14 @@ public class CommonserviceImpl {
return userInfos; return userInfos;
} }
public List<TzsUserInfo> getUserPhonesByPersonCode(String personCode) {
QueryWrapper userInfoQueryWrapper = new QueryWrapper<>();
userInfoQueryWrapper.eq("sequence_nbr", personCode);
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
return userInfos;
}
public List<TzBaseEnterpriseInfo> getInspectionUnitList() { public List<TzBaseEnterpriseInfo> getInspectionUnitList() {
return enterpriseInfoMapper.getInspectionUnitList(UNIT_TYPE); return enterpriseInfoMapper.getInspectionUnitList(UNIT_TYPE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment