Commit bb5a6af5 authored by 刘凡's avatar 刘凡

优化:移装变更列表接口合并

parent ca335276
......@@ -20,7 +20,7 @@ public interface JgChangeRegistrationTransferMapper extends BaseMapper<JgChangeR
void updatePromoter(@Param ("id")Long id);
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationTransferDto dto , @Param("roleIds") List<String> roleIds);
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationTransferDto dto , @Param("roleIds") List<String> roleIds, @Param("type") String type);
@Select("select name from tz_equipment_category where code=#{code}")
String getEquiplistNameByEquiplist(String code);
......
......@@ -28,7 +28,7 @@ public interface IJgChangeRegistrationTransferService extends IService<JgChangeR
Map<String, Map<String, Object>> getTransferDetail(String sequenceNbr, String equipId);
Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params);
Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params, String type);
void flowExecute(Long sequenceNbr, String instanceId, String operate, String comment);
......
......@@ -52,11 +52,11 @@
crt.execute_sequence like concat('%',#{role},'%')
</foreach>
</if>
<if test="dto.dataType == 'jg' ">
and crt.receive_company_code = #{dto.unitCode}
<if test="type == 'supervision'">
AND crt.receive_company_code = #{dto.unitCode}
</if>
<if test="dto.dataType == 'company' ">
and crt.use_unit_credit_code = #{dto.unitCode}
<if test="type == 'company'">
AND crt.use_unit_credit_code = #{dto.unitCode}
</if>
</where>
order by crt.rec_date desc
......
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.netflix.ribbon.proxy.annotation.Http;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -46,6 +47,8 @@ public class JgChangeRegistrationTransferController extends BaseController {
@Autowired
IJgChangeRegistrationTransferService jgChangeRegistrationTransferService;
@Autowired
IJgInstallationNoticeService iJgInstallationNoticeService;
/**
* 新增移装变更登记登记
......@@ -149,7 +152,8 @@ public class JgChangeRegistrationTransferController extends BaseController {
@RequestParam(value = "size") int size,
JgChangeRegistrationTransferDto params) {
Page<Map<String, Object>> page = new Page<>(current, size);
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.queryListForPage(page,params));
String type = (String) iJgInstallationNoticeService.getCompanyType().get("companyLevel");
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.queryListForPage(page,params, type));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -557,8 +557,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param params
* @return
*/
public Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params) {
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, params, params.getRoleIds());
public Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params, String type) {
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, params, params.getRoleIds(), type);
listPage.getRecords().stream().forEach(item -> {
// 流程未走完时,移装地址需从 历史表中获取
if (item.containsKey("status") && !FlowStatusEnum.TO_BE_FINISHED.getName().equals(item.get("status").toString())) {
......
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