修改往来单位实体类名字

master
郑明梁 2 years ago
parent 9f5c9687b1
commit d5aab2f18c

@ -186,11 +186,11 @@ public class ThrCorpExportLogController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
ThrSystemDetailEntity basicThirdSysDetailEntity = thrCorpService.selectByKey("corpUrl", unitMaintainFilterRequest.getThirdSys()); ThrSystemDetailEntity thrSystemDetailEntity = thrCorpService.selectByKey("corpUrl", unitMaintainFilterRequest.getThirdSys());
if (basicThirdSysDetailEntity == null || basicThirdSysDetailEntity.getValue() == null) if (thrSystemDetailEntity == null || thrSystemDetailEntity.getValue() == null)
return ResultVOUtils.error(500, "往来单位接口地址未定义"); return ResultVOUtils.error(500, "往来单位接口地址未定义");
if (basicThirdSysDetailEntity.getEnabled()) { if (thrSystemDetailEntity.getEnabled()) {
if (basicThirdSysDetailEntity.getFromType() == 0) { if (thrSystemDetailEntity.getFromType() == 0) {
BaseResponse<PageSimpleResponse<ThrCorpsResponse>> udiDlDeviceResponse = BaseResponse<PageSimpleResponse<ThrCorpsResponse>> udiDlDeviceResponse =
erpBasicClient.getErpCrop(unitMaintainFilterRequest); erpBasicClient.getErpCrop(unitMaintainFilterRequest);
return udiDlDeviceResponse; return udiDlDeviceResponse;

@ -7,8 +7,6 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BasicProcessStatus; import com.glxp.api.constant.BasicProcessStatus;
import com.glxp.api.constant.Constant; import com.glxp.api.constant.Constant;
import com.glxp.api.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.entity.thrsys.ThrCorpEntity;
import com.glxp.api.entity.thrsys.ThrCorpImportLogEntity; import com.glxp.api.entity.thrsys.ThrCorpImportLogEntity;
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
import com.glxp.api.http.ErpBasicClient; import com.glxp.api.http.ErpBasicClient;
@ -18,6 +16,7 @@ import com.glxp.api.req.thrsys.PostThrCorpRequest;
import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest; import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.thrsys.ThrCorpsResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse;
import com.glxp.api.res.thrsys.ThrUnitMaintainResponse;
import com.glxp.api.service.thrsys.ThrCorpImportLogService; import com.glxp.api.service.thrsys.ThrCorpImportLogService;
import com.glxp.api.service.thrsys.ThrCorpService; import com.glxp.api.service.thrsys.ThrCorpService;
import com.glxp.api.service.thrsys.ThrCorpsDlService; import com.glxp.api.service.thrsys.ThrCorpsDlService;
@ -193,8 +192,8 @@ public class ThrCorpsController {
BaseResponse<PageSimpleResponse<ThrCorpsResponse>> udiDlDeviceResponse = erpBasicClient.getErpCrop(thrUnitMaintainFilterRequest); BaseResponse<PageSimpleResponse<ThrCorpsResponse>> udiDlDeviceResponse = erpBasicClient.getErpCrop(thrUnitMaintainFilterRequest);
if (udiDlDeviceResponse.getCode() == 20000) { if (udiDlDeviceResponse.getCode() == 20000) {
for (ThrCorpsResponse erpUnitsResponse : udiDlDeviceResponse.getData().getList()) { for (ThrCorpsResponse erpUnitsResponse : udiDlDeviceResponse.getData().getList()) {
BasicUnitMaintainEntity basicUnitMaintainEntity = thrCorpService.selectByThirdId(erpUnitsResponse.getId(), thrUnitMaintainFilterRequest.getThirdSys()); ThrUnitMaintainResponse thrUnitMaintainResponse = thrCorpService.selectByThirdId(erpUnitsResponse.getId(), thrUnitMaintainFilterRequest.getThirdSys());
if (basicUnitMaintainEntity != null) { if (thrUnitMaintainResponse != null) {
erpUnitsResponse.setChecked(true); erpUnitsResponse.setChecked(true);
} else { } else {
erpUnitsResponse.setChecked(false); erpUnitsResponse.setChecked(false);
@ -215,8 +214,8 @@ public class ThrCorpsController {
{ {
ThrCorpsResponse thrCorpEntity = new ThrCorpsResponse(); ThrCorpsResponse thrCorpEntity = new ThrCorpsResponse();
BeanUtils.copyProperties(item, thrCorpEntity); BeanUtils.copyProperties(item, thrCorpEntity);
BasicUnitMaintainEntity basicUnitMaintainEntity = thrCorpService.selectByThirdId(item.getUnitId(), thrUnitMaintainFilterRequest.getThirdSys()); ThrUnitMaintainResponse thrUnitMaintainResponse = thrCorpService.selectByThirdId(item.getUnitId(), thrUnitMaintainFilterRequest.getThirdSys());
if (basicUnitMaintainEntity != null) { if (thrUnitMaintainResponse != null) {
thrCorpEntity.setChecked(true); thrCorpEntity.setChecked(true);
} else { } else {
thrCorpEntity.setChecked(false); thrCorpEntity.setChecked(false);

@ -1,12 +1,12 @@
package com.glxp.api.dao.thrsys; package com.glxp.api.dao.thrsys;
import com.glxp.api.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.entity.thrsys.ThrCorpEntity; import com.glxp.api.entity.thrsys.ThrCorpEntity;
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest;
import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest; import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest;
import com.glxp.api.res.thrsys.ThrCorpsResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse;
import com.glxp.api.res.thrsys.ThrUnitMaintainResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -31,8 +31,9 @@ public interface ThrCorpDao {
void importThrCorp(ThrCorpEntity thrCorpEntity); void importThrCorp(ThrCorpEntity thrCorpEntity);
BasicUnitMaintainEntity selectByThirdId(ThrUnitMaintainFilterRequest thrUnitMaintainFilterRequest); ThrUnitMaintainResponse selectByThirdId(ThrUnitMaintainFilterRequest thrUnitMaintainFilterRequest);
ThrSystemDetailEntity selectByKey(@Param("key") String key, @Param("thirdSys") String thirdSys); ThrSystemDetailEntity selectByKey(@Param("key") String key, @Param("thirdSys") String thirdSys);
} }

@ -1,4 +1,4 @@
package com.glxp.api.entity.basic; package com.glxp.api.res.thrsys;
import lombok.Data; import lombok.Data;
@ -6,7 +6,7 @@ import javax.validation.constraints.NotBlank;
import java.util.Date; import java.util.Date;
@Data @Data
public class BasicUnitMaintainEntity { public class ThrUnitMaintainResponse {
private Integer id; private Integer id;
private String erpId; private String erpId;

@ -1,11 +1,13 @@
package com.glxp.api.service.thrsys; package com.glxp.api.service.thrsys;
import com.glxp.api.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.entity.thrsys.ThrCorpEntity; import com.glxp.api.entity.thrsys.ThrCorpEntity;
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest;
import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest;
import com.glxp.api.res.thrsys.ThrCorpsResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse;
import com.glxp.api.res.thrsys.ThrUnitMaintainResponse;
import java.util.List; import java.util.List;
@ -25,7 +27,7 @@ public interface ThrCorpService {
boolean deleteAll(); boolean deleteAll();
BasicUnitMaintainEntity selectByThirdId(String thirdId, String thirdSys); ThrUnitMaintainResponse selectByThirdId(String thirdId, String thirdSys);
ThrSystemDetailEntity selectByKey(String key, String thirdSys); ThrSystemDetailEntity selectByKey(String key, String thirdSys);

@ -2,12 +2,12 @@ package com.glxp.api.service.thrsys.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.thrsys.ThrCorpDao; import com.glxp.api.dao.thrsys.ThrCorpDao;
import com.glxp.api.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.entity.thrsys.ThrCorpEntity; import com.glxp.api.entity.thrsys.ThrCorpEntity;
import com.glxp.api.entity.thrsys.ThrSystemDetailEntity; import com.glxp.api.entity.thrsys.ThrSystemDetailEntity;
import com.glxp.api.req.thrsys.FilterThrCorpRequest; import com.glxp.api.req.thrsys.FilterThrCorpRequest;
import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest; import com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest;
import com.glxp.api.res.thrsys.ThrCorpsResponse; import com.glxp.api.res.thrsys.ThrCorpsResponse;
import com.glxp.api.res.thrsys.ThrUnitMaintainResponse;
import com.glxp.api.service.thrsys.ThrCorpService; import com.glxp.api.service.thrsys.ThrCorpService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -64,7 +64,7 @@ public class ThrCorpServiceImpl implements ThrCorpService {
return thrCorpDao.deleteAll(); return thrCorpDao.deleteAll();
} }
@Override @Override
public BasicUnitMaintainEntity selectByThirdId(String thirdId, String thirdSys) { public ThrUnitMaintainResponse selectByThirdId(String thirdId, String thirdSys) {
ThrUnitMaintainFilterRequest filterUdiInfoRequest = new ThrUnitMaintainFilterRequest(); ThrUnitMaintainFilterRequest filterUdiInfoRequest = new ThrUnitMaintainFilterRequest();

@ -118,7 +118,7 @@
</insert> </insert>
<select id="selectByThirdId" parameterType="com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest" <select id="selectByThirdId" parameterType="com.glxp.api.req.thrsys.ThrUnitMaintainFilterRequest"
resultType="com.glxp.api.entity.basic.BasicUnitMaintainEntity"> resultType="com.glxp.api.res.thrsys.ThrUnitMaintainResponse">
select * FROM basic_corp select * FROM basic_corp
<where> <where>
<if test="thirdId != '' and thirdId != null"> <if test="thirdId != '' and thirdId != null">

Loading…
Cancel
Save