Commit bb5a6af5 authored by 刘凡's avatar 刘凡

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

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