阳光平台对照主键修改

master
hongtianzai 3 years ago
parent abd1e5bd3b
commit 2ba7b19ce7

@ -1,5 +1,6 @@
package com.glxp.udidl.admin.controller.device;
import com.alibaba.fastjson.JSONObject;
import com.glxp.udidl.admin.dao.udi.ProductInfoDao;
import com.glxp.udidl.admin.entity.udid.Device;
import com.glxp.udidl.admin.req.ListPageRequest;
@ -121,4 +122,16 @@ public class TestController {
public ResponseEntity<String> getGoods(){
return udplatDownloadService.getUdplatGoods(1,100);
}
@GetMapping("/test/getPurchaseOrders")
public ResponseEntity<String> getPurchaseOrders(String orderCode){
return udplatDownloadService.getPurchaseOrders(orderCode);
}
@GetMapping("/test/getPurchaseOrderDetals")
public ResponseEntity<String> getPurchaseOrderDetals(Long orderId){
return udplatDownloadService.getPurchaseOrderDetals(orderId);
}
@GetMapping("/test/getDistributeOrderDetails")
public JSONObject getDistributeOrderDetails(Long orderId){
return udplatDownloadService.getDistributeOrderDetails(orderId);
}
}

@ -7,10 +7,11 @@ public class UdplatGoodsMatchListModel {
private String uuid;//uuid
private String nameCode;//最小销售单元产品标识
private String ylqxzcrbarmc;//注册/备案人名称
private String zczbhhzbapzbh;//注册证号
private String cpmctymc;//产品名称
private String ggxh; //规格型号
private String cpms; //产品描述
private String deviceRecordKey;//产品key
private String deliveryGoodId;//目录key
private String deliveryGoodsId;//目录key
private String medicalCode;//医保编码
}

@ -10,9 +10,9 @@ public class UdplatGoodsMatchModel {
private String deviceRecordKey;
/**
*
* ID
*/
private String projectGoodsCode;
private String deliveryGoodsId;
/**
*

@ -4,6 +4,8 @@ import lombok.Data;
@Data
public class UdplatGoodsMatchParam extends BaseParam{
private String nameCode;
private int goodsMatchType;//产品目录 0:全部 1:已对照 2未对照
private int medicalMatchType;//医保编码 0:全部 1:已对照 2未对照
}

@ -24,9 +24,9 @@ public class UdplatGoodsMatch {
private String deviceRecordKey;
/**
*
* ID
*/
private String projectGoodsCode;
private String deliveryGoodsId;
/**
*

@ -216,6 +216,25 @@ public class UdplatDownloadService {
map.put("pageSize",pageSize+"");
return post(UdplatHospitalModel.class,url,getHeader(map),null,map);
}
public ResponseEntity<String> getPurchaseOrders(String orderCode){
String url="/hsapi/purchase/orders";
Map<String,String> map = new HashMap<>();
if(orderCode != null && orderCode != "")
map.put("orderCode",orderCode);
return get(url,getHeader(map),null,map);
}
public ResponseEntity<String> getPurchaseOrderDetals(Long orderId){
String url="/hsapi/purchase/orderDetals";
Map<String,String> map = new HashMap<>();
map.put("orderId",orderId+"");
return get(url,getHeader(map),null,map);
}
public JSONObject getDistributeOrderDetails(Long orderId){
String url="/hsapi/distribute/orderDetails";
Map<String,String> map = new HashMap<>();
map.put("orderId",orderId+"");
return post2(url,getHeader(map),null,map);
}
public UdplatResponse getUdplatGoods(int page,int pageSize,String startTime,String endTime){
String url="/hsapi/purchase/delivery/goods/query";
Map<String,String> map = new HashMap<>();

@ -38,7 +38,7 @@ public class UdplatGoodsMatchServiceImpl implements UdplatGoodsMatchService {
udplatGoodsMatchMapper.insert(udplatGoodsMatch);
}else
{
udplatGoodsMatch.setProjectGoodsCode(model.getProjectGoodsCode());
udplatGoodsMatch.setDeliveryGoodsId(model.getDeliveryGoodsId());
udplatGoodsMatch.setMedicalCode(model.getMedicalCode());
udplatGoodsMatch.setUpdateTime(new Date());
udplatGoodsMatchMapper.updateByPrimaryKey(udplatGoodsMatch);

@ -97,8 +97,8 @@ public class UdplatGoodsServiceImpl implements UdplatGoodsService {
try
{
for (UdplatGoodsModel item : models) {
String projectGoodsCode = item.getProjectGoodsCode();
UdplatGoods goods = udplatGoodsMapper.selectByProjectGoodsCode(projectGoodsCode);
String deliveryGoodsId = item.getDeliveryGoodsId();
UdplatGoods goods = udplatGoodsMapper.selectByGoodsId(deliveryGoodsId);
if(goods == null){
goods = new UdplatGoods();
goods.setId(0L);

@ -20,6 +20,10 @@ spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB
# 阳光采购平台
udplat.host=http://pre-mcs.udplat.org/mcs-api
#udplat.appId=10000090
#udplat.secretKey=QchvZnPYK1jyOYV
#udplat.userName=\u8bcf\u5b89\u53bf\u533b\u9662
udplat.appId=20004072
udplat.secretKey=hoGxLSEsSyysnS9
udplat.userName=\u798F\u5EFA\u7247\u4ED4\u7640\u8BCA\u65AD\u6280\u672F\u6709\u9650\u516C\u53F8

@ -4,7 +4,7 @@
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="deviceRecordKey" jdbcType="VARCHAR" property="deviceRecordKey" />
<result column="projectGoodsCode" jdbcType="VARCHAR" property="projectGoodsCode" />
<result column="deliveryGoodsId" jdbcType="VARCHAR" property="deliveryGoodsId" />
<result column="medicalCode" jdbcType="VARCHAR" property="medicalCode" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
@ -14,10 +14,10 @@
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch">
insert into udplat_goods_match (id, deviceRecordKey, projectGoodsCode,
insert into udplat_goods_match (id, deviceRecordKey, deliveryGoodsId,
medicalCode, createTime
)
values (#{id,jdbcType=INTEGER}, #{deviceRecordKey,jdbcType=VARCHAR}, #{projectGoodsCode,jdbcType=VARCHAR},
values (#{id,jdbcType=INTEGER}, #{deviceRecordKey,jdbcType=VARCHAR}, #{deliveryGoodsId,jdbcType=VARCHAR},
#{medicalCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
@ -25,7 +25,7 @@
update udplat_goods_match
set deviceRecordKey = #{deviceRecordKey,jdbcType=VARCHAR},
<if test="projectGoodsCode != null and projectGoodsCode !='' ">
projectGoodsCode = #{projectGoodsCode,jdbcType=VARCHAR},
projectGoodsCode = #{deliveryGoodsId,jdbcType=VARCHAR},
</if>
<if test="medicalCode != null and medicalCode !='' ">
medicalCode = #{medicalCode,jdbcType=VARCHAR},
@ -34,30 +34,30 @@
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, deviceRecordKey, projectGoodsCode, medicalCode, createTime, updateTime
select id, deviceRecordKey, deliveryGoodsId, medicalCode, createTime, updateTime
from udplat_goods_match
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, deviceRecordKey, projectGoodsCode, medicalCode, createTime, updateTime
select id, deviceRecordKey, deliveryGoodsId, medicalCode, createTime, updateTime
from udplat_goods_match
</select>
<select id="selectByDeviceRecordKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select id, deviceRecordKey, projectGoodsCode, medicalCode, createTime, updateTime
select id, deviceRecordKey, deliveryGoodsId, medicalCode, createTime, updateTime
from udplat_goods_match
where deviceRecordKey = #{id}
</select>
<select id="getList" parameterType="com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchParam" resultType="com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchListModel">
select p.uuid, p.nameCode,p.ylqxzcrbarmc, p.cpmctymc,p.ggxh,p.cpms,p.deviceRecordKey,m.projectGoodsCode,m.medicalCode from productinfo as p
select p.uuid, p.nameCode,p.ylqxzcrbarmc,p.zczbhhzbapzbh, p.cpmctymc,p.ggxh,p.cpms,p.deviceRecordKey,m.deliveryGoodsId,m.medicalCode from productinfo as p
left join udplat_goods_match as m on p.deviceRecordKey = m.deviceRecordKey where p.isNewest =1 and p.diType=1
<if test="name != null and name != ''">
and (p.cpmctymc like concat(#{name},'%') or p.ylqxzcrbarmc like concat(#{name},'%'))
</if>
<if test="goodsMatchType == 1">
and m.projectGoodsCode is not null and m.projectGoodsCode != ''
and m.deliveryGoodsId is not null and m.deliveryGoodsId != ''
</if>
<if test="goodsMatchType == 2">
and (m.projectGoodsCode is null or m.projectGoodsCode = '')
and (m.deliveryGoodsId is null or m.deliveryGoodsId = '')
</if>
<if test="medicalMatchType == 1">
and m.medicalCode is not null and m.medicalCode != ''
@ -73,7 +73,7 @@
</if>
</select>
<select id="getMatchList" parameterType="java.lang.String" resultType="com.glxp.udidl.admin.dto.device.ProductGoodsMatchModel">
select p.*,m.projectGoodsCode,m.medicalCode from productinfo as p
select p.*,m.deliveryGoodsId,m.medicalCode from productinfo as p
left join udplat_goods_match as m on p.deviceRecordKey = m.deviceRecordKey where p.uuid=#{uuid}
</select>
</mapper>

@ -20,6 +20,10 @@ spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB
# 阳光采购平台
udplat.host=http://pre-mcs.udplat.org/mcs-api
#udplat.appId=10000090
#udplat.secretKey=QchvZnPYK1jyOYV
#udplat.userName=\u8bcf\u5b89\u53bf\u533b\u9662
udplat.appId=20004072
udplat.secretKey=hoGxLSEsSyysnS9
udplat.userName=\u798F\u5EFA\u7247\u4ED4\u7640\u8BCA\u65AD\u6280\u672F\u6709\u9650\u516C\u53F8
Loading…
Cancel
Save