1.修改查询第三方系统配置参数代码

master
x_z 3 years ago
parent cc5895c4eb
commit 19ff0294f3

@ -101,15 +101,8 @@ public class PhxyyClient implements BaseHttpClient {
if (StrUtil.isEmpty(udiwmsOrderRequest.getThirdSys())) {
return ResultVOUtils.error(500, "第三方系统ID不能为空");
}
BussinessOriginTypeResponse bussinessOriginTypeResponse = bussinessOriginTypeService.findByKey(udiwmsOrderRequest.getBillType(), udiwmsOrderRequest.getThirdSys());
udiwmsOrderRequest.setBillType(bussinessOriginTypeResponse.getThirdAction());
if (bussinessOriginTypeResponse.getMainAction().equals("WareHouseIn")) {
udiwmsOrderRequest.setInoutType(1);
} else if (bussinessOriginTypeResponse.getMainAction().equals("WareHouseOut")) {
udiwmsOrderRequest.setInoutType(2);
}
BasicThirdSysBusApiEntity basicThirdSysBusApiEntity = basicThirdSysBusApiService.selectByKey(bussinessOriginTypeResponse.getThirdAction(), bussinessOriginTypeResponse.getThirdSys(), 1);
String response = HttpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + basicThirdSysBusApiEntity.getUrl(), udiwmsOrderRequest, getHeaders());
BasicThirdSysDetailEntity basicThirdSysDetailEntity = basicThirdSysDetailDao.selectByKey("orderSubmitUrl", udiwmsOrderRequest.getThirdSys());
String response = HttpClient.postJson(thirdSysConfig.getThirdSysConfig().getThirdSysUrl() + basicThirdSysDetailEntity.getValue(), udiwmsOrderRequest, getHeaders());
BaseResponse baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});

@ -12,19 +12,14 @@ import javax.annotation.Resource;
@Configuration
public class ThirdSysConfig {
@Value("THIRD_ID")
@Value("${THIRD_ID}")
private String thirdSys;
@Resource
private BasicThirdSysDao basicThirdSysDao;
private BasicThirdSysEntity basicThirdSysEntity;
public BasicThirdSysEntity getThirdSysConfig() {
if (basicThirdSysEntity == null) {
basicThirdSysEntity = basicThirdSysDao.selectByThirdId(thirdSys);
}
return basicThirdSysEntity;
return basicThirdSysDao.selectByThirdId(thirdSys);
}
}

@ -8,19 +8,23 @@ import java.math.BigDecimal;
public class UdiwmsOrderDetail {
private String productId; //产品编码
private String productName; //产品名称
private BigDecimal price; //单价
private String batchNo; //批次号
private String expireDate; //失效日期
private String productDate; //生产日期
private String standard; //规格型号
private String productName; //产品名称
private String billNo; //单据号
private String secSalesInvNo;//销售发票号(第二票)
private String invoiceDate;//发票日期
private String secSalesListNo; //第二票销售清单号
private String firstSalesInvNo; //销售发票号(第一票)
private String registerNo; //注册/备案证号
private String manufactory; //生产厂家
private Integer count; //数量
private Integer reCount; //数量
private String remark; //备注
private String remark1; //备注1/规格型号ID
private String remark2; //备注2/型号
private String remark3; //备注3/规格
//阳光采购平台 耗材目录规格id
private String productSpecId;
}

@ -2,11 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.mipsdl.admin.dao.basic.BasicThirdSysDao">
<select id="selectByThirdId" resultType="com.glxp.mipsdl.admin.entity.basic.BasicThirdSysEntity">
</select>
<select id="selectByThirdId" resultType="com.glxp.mipsdl.admin.entity.basic.BasicThirdSysEntity">
select apikey, secretkey, thirdSysUrl
from basic_third_sys
where thirdId = #{thirdId}
</select>
</mapper>
Loading…
Cancel
Save