dev_unify
parent
610408ac5c
commit
85512b32b7
@ -0,0 +1,49 @@
|
|||||||
|
package com.glxp.api.entity.thrsys;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ThirdAliSearchbill {
|
||||||
|
private String billType;
|
||||||
|
private String billCode;
|
||||||
|
private String fromUserId;
|
||||||
|
private String refUserName;
|
||||||
|
private String refUserId;
|
||||||
|
private String produceDate;
|
||||||
|
private String uploadFileName;
|
||||||
|
private String fromUserName;
|
||||||
|
private String toUserId;
|
||||||
|
private String produceEntId;
|
||||||
|
private String billTime;
|
||||||
|
private String userRoleType;
|
||||||
|
private String processDate;
|
||||||
|
private String billId;
|
||||||
|
private String toUserName;
|
||||||
|
private String agentUserName;
|
||||||
|
private String agentRefUserId;
|
||||||
|
private String billTypeName;
|
||||||
|
private String toRefUserId;
|
||||||
|
private String fromRefUserId;
|
||||||
|
|
||||||
|
|
||||||
|
private String erpId;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "createTime")
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "updateTime")
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.glxp.api.req.alihealth;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AlihealthKytSearchbillReqeust extends AlihealthKytCommonParametersReqeust {
|
||||||
|
private String ref_ent_id;
|
||||||
|
private String auth_ref_user_id;
|
||||||
|
private String begin_date;
|
||||||
|
private String end_date;
|
||||||
|
|
||||||
|
private String partner_id_send;
|
||||||
|
private String partner_id_recv;
|
||||||
|
private String agent_ref_user_id;
|
||||||
|
private String bill_code;
|
||||||
|
|
||||||
|
private String bill_type;
|
||||||
|
private Integer cur_page;
|
||||||
|
private Integer page_size;
|
||||||
|
|
||||||
|
public AlihealthKytSearchbillReqeust(){
|
||||||
|
this.setMethod("alibaba.alihealth.drug.kyt.searchbill");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.req.alihealth.local;
|
||||||
|
|
||||||
|
import com.glxp.api.req.alihealth.AlihealthKytDrugrescodeReqeust;
|
||||||
|
import com.glxp.api.req.alihealth.AlihealthKytSearchbillReqeust;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AlihealthThirdAliSearchbillInsertReqeust {
|
||||||
|
private String erpId;
|
||||||
|
private String appSecret;
|
||||||
|
private AlihealthKytSearchbillReqeust alihealthKytSearchbillReqeust;
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
package com.glxp.api.res.alihealth;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.glxp.api.entity.collect.RelCodeBatch;
|
||||||
|
import com.glxp.api.entity.thrsys.ThirdAliDrug;
|
||||||
|
import com.glxp.api.entity.thrsys.ThirdAliSearchbill;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AlihealthKytSearchbillResponse extends AlihealthKytCommonParametersResponse {
|
||||||
|
private JSONArray bill_chk_in_out_do;
|
||||||
|
public AlihealthKytSearchbillResponse(String json) {
|
||||||
|
// 初始化请求的值
|
||||||
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(json);
|
||||||
|
JSONObject jsonObjectResult = null;
|
||||||
|
for (String s : jsonObject.keySet()) {
|
||||||
|
jsonObjectResult = jsonObject.getJSONObject(s).getJSONObject("result");
|
||||||
|
|
||||||
|
}
|
||||||
|
AlihealthKytCommonParametersResponse alihealthKytCommonParametersResponse = JSONUtil.toBean(jsonObjectResult.toString(),
|
||||||
|
AlihealthKytCommonParametersResponse.class);
|
||||||
|
BeanUtils.copyProperties(alihealthKytCommonParametersResponse,this);
|
||||||
|
if(StringUtils.isNotEmpty(this.getMsg_info())
|
||||||
|
&& this.getMsg_info().equals("调用成功")
|
||||||
|
){
|
||||||
|
this.disposeResult(jsonObjectResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public void disposeResult(JSONObject jsonObjectResult){
|
||||||
|
JSONObject jsonObjectModel = jsonObjectResult.getJSONObject("model");
|
||||||
|
if (!Objects.isNull(jsonObjectModel)) {
|
||||||
|
this.setBill_chk_in_out_do(jsonObjectModel.getJSONObject("result_list").getJSONArray("bill_chk_in_out_do"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ThirdAliSearchbill> disposeThirdAliSearchbill(String customerId){
|
||||||
|
List<ThirdAliSearchbill> list = new ArrayList<>();
|
||||||
|
List<JSONObject> jsonArray = (List) this.getBill_chk_in_out_do();
|
||||||
|
if (jsonArray != null && jsonArray.size() > 0) {
|
||||||
|
for (JSONObject jsonObject : jsonArray) {
|
||||||
|
if (!Objects.isNull(jsonObject)) {
|
||||||
|
ThirdAliSearchbill thirdAliSearchbill = new ThirdAliSearchbill();
|
||||||
|
thirdAliSearchbill.setBillType(jsonObject.getStr("bill_type"));
|
||||||
|
thirdAliSearchbill.setBillCode(jsonObject.getStr("bill_code"));
|
||||||
|
thirdAliSearchbill.setFromUserId(jsonObject.getStr("from_user_id"));
|
||||||
|
thirdAliSearchbill.setRefUserName(jsonObject.getStr("ref_user_name"));;
|
||||||
|
thirdAliSearchbill.setRefUserId(jsonObject.getStr("ref_user_id"));
|
||||||
|
thirdAliSearchbill.setProduceDate(jsonObject.getStr("produce_date"));
|
||||||
|
thirdAliSearchbill.setUploadFileName(jsonObject.getStr("upload_file_name"));
|
||||||
|
thirdAliSearchbill.setFromUserName(jsonObject.getStr("from_user_name"));
|
||||||
|
thirdAliSearchbill.setToUserId(jsonObject.getStr("to_user_id"));
|
||||||
|
thirdAliSearchbill.setProduceEntId(jsonObject.getStr("produce_ent_id"));
|
||||||
|
thirdAliSearchbill.setBillTime(jsonObject.getStr("bill_time"));
|
||||||
|
thirdAliSearchbill.setUserRoleType(jsonObject.getStr("user_role_type"));
|
||||||
|
thirdAliSearchbill.setProcessDate(jsonObject.getStr("process_date"));
|
||||||
|
thirdAliSearchbill.setBillId(jsonObject.getStr("bill_id"));
|
||||||
|
thirdAliSearchbill.setToUserName(jsonObject.getStr("to_user_name"));
|
||||||
|
thirdAliSearchbill.setAgentUserName(jsonObject.getStr("agent_user_name"));
|
||||||
|
thirdAliSearchbill.setAgentRefUserId(jsonObject.getStr("agent_ref_user_id"));
|
||||||
|
thirdAliSearchbill.setBillTypeName(jsonObject.getStr("bill_type_name"));
|
||||||
|
thirdAliSearchbill.setToRefUserId(jsonObject.getStr("to_ref_user_id"));
|
||||||
|
thirdAliSearchbill.setFromRefUserId(jsonObject.getStr("from_ref_user_id"));
|
||||||
|
thirdAliSearchbill.setErpId("customerId");
|
||||||
|
thirdAliSearchbill.setCreateTime(new Date());
|
||||||
|
thirdAliSearchbill.setUpdateTime(new Date());
|
||||||
|
list.add(thirdAliSearchbill);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue