漳州中医院客户端--智业接口对接 转换规格型号

dev
郑明梁 2 years ago
parent 735cf27c62
commit 6903c9990b

@ -40,6 +40,7 @@ import com.glxp.mipsdl.req.post.PostThrProductsRequest;
import com.glxp.mipsdl.req.zaxyy.ZaxzyyOrderRequest;
import com.glxp.mipsdl.req.zzzyy.ZzzyyRequest;
import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.res.udiwms.ZzzyyProductsResponse;
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
import com.glxp.mipsdl.service.thrsys.ThrCorpService;
import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
@ -154,6 +155,21 @@ public class ZzzyyClient implements BaseHttpClient {
response = parserResult(response);
try {
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
List<ZzzyyProductsResponse> zzzyyProductsResponse = (List<ZzzyyProductsResponse>) baseResponse.getData();
for (ZzzyyProductsResponse productsResponse : zzzyyProductsResponse) {
//判断要是规格和型号一致就是取规格 不一致就合并
if (StrUtil.isNotEmpty(productsResponse.getModel_number()) && StrUtil.isNotEmpty(productsResponse.getStandard())) {
if (productsResponse.getModel_number().equals(productsResponse.getStandard())) {
productsResponse.setStandard(productsResponse.getStandard());
} else {
productsResponse.setStandard(productsResponse.getStandard() + productsResponse.getModel_number());
}
} else if (StrUtil.isNotEmpty(productsResponse.getModel_number()) && StrUtil.isBlank(productsResponse.getStandard())) {
productsResponse.setStandard(productsResponse.getModel_number());
}
baseResponse.setData("");
baseResponse.setData(zzzyyProductsResponse);
}
return baseResponse;
} catch (Exception e) {
log.error("解析漳州中医院智业接口返回产品信息字典数据异常,返回结果:{}", response);

@ -0,0 +1,56 @@
package com.glxp.mipsdl.res.udiwms;
import cn.hutool.core.util.StrUtil;
import lombok.Data;
import java.util.Date;
@Data
public class ZzzyyProductsResponse {
private Long id;
private String code; //产品编码
private String name;
private String measname; //计量单位
private String spec; //规格型号
private String registerNo; //注册证号
private String thirdSysFk;
private String manufactory; //生产厂家
private String cplb;
private String flbm;
private String qxlb;
private String ybbm;
private String sptm;
private String tyshxydm;
private String zczbhhzbapzbh;
private String ylqxzcrbarmc;
private String ylqxzcrbarywmc;
private String cpms;
private String supName; //配送企业
private String thirdSysName;
//辅助字段
private boolean isChecked;
private String thirdSys;
//添加字段
private String model; //型号
private String standard; //规格型号,二合一字段
private String qtbm; //其他编码
private String zczyxqz; //注册有效期截止时间
private String price;
private String remark1; //备注1
private String remark2; //备注2
private String remark3; //备注3
private String createUser;
private Date createTime;
private String updateUser;
private Date updateTime;
private String remark;
private String manufactoryCode;
private String supCode;
private String model_number;
}
Loading…
Cancel
Save