阳光采购平台基础库信息

master
hongtianzai 4 years ago
parent f923364674
commit f8b557ee7e

@ -4,6 +4,7 @@ import com.glxp.udidl.admin.dao.udi.ProductInfoDao;
import com.glxp.udidl.admin.entity.udid.Device; import com.glxp.udidl.admin.entity.udid.Device;
import com.glxp.udidl.admin.req.ListPageRequest; import com.glxp.udidl.admin.req.ListPageRequest;
import com.glxp.udidl.admin.service.DataSync.DeviceSyncService; import com.glxp.udidl.admin.service.DataSync.DeviceSyncService;
import com.glxp.udidl.admin.service.DataSync.UdplatDownloadService;
import com.glxp.udidl.admin.service.inout.DeviceService; import com.glxp.udidl.admin.service.inout.DeviceService;
import com.glxp.udidl.admin.service.inout.ProductInfoService; import com.glxp.udidl.admin.service.inout.ProductInfoService;
import com.glxp.udidl.admin.service.udi.UdiCompanyService; import com.glxp.udidl.admin.service.udi.UdiCompanyService;
@ -41,7 +42,8 @@ public class TestController {
//DownloadProductInfoTask downloadTask3; //DownloadProductInfoTask downloadTask3;
@Autowired @Autowired
DeviceSyncService deviceSyncService; DeviceSyncService deviceSyncService;
@Autowired
UdplatDownloadService udplatDownloadService;
@GetMapping("udidl/device/transfer") @GetMapping("udidl/device/transfer")
public void transfer() { public void transfer() {
List<String> keys = deviceService.findAllByZxxscpbs(); List<String> keys = deviceService.findAllByZxxscpbs();
@ -95,8 +97,10 @@ public class TestController {
logger.info(month + "---按月开启下载"); logger.info(month + "---按月开启下载");
asyncDownloadTask.downloadByMonth(month, page); asyncDownloadTask.downloadByMonth(month, page);
} }
@GetMapping("/test/getDistributor")
public String udplatTest(){
return udplatDownloadService.getDistributor();
}
} }

@ -0,0 +1,35 @@
package com.glxp.udidl.admin.controller.udplat;
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel;
import com.glxp.udidl.admin.service.udplat.UdplatDistributorService;
import com.glxp.udidl.common.res.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
*
*/
@RestController
@RequestMapping("/udplat/distributor")
public class UdplatDistributorController {
@Autowired
private UdplatDistributorService udplatDistributorService;
@AuthRuleAnnotation("udidl_udplatDistributor_all")
@PostMapping("/list")
public BaseResponse getList(@RequestBody BaseParam param){
return udplatDistributorService.getList(param);
}
@AuthRuleAnnotation("udidl_udplatDistributor_all")
@PostMapping("/import")
public BaseResponse imports(@RequestBody List<UdplatDistributorModel> models){
return udplatDistributorService.imports(models);
}
}

@ -1,21 +1,32 @@
package com.glxp.udidl.admin.controller.udplat; package com.glxp.udidl.admin.controller.udplat;
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation; import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.service.udplat.UdplatGoodsService; import com.glxp.udidl.admin.service.udplat.UdplatGoodsService;
import com.glxp.udidl.common.res.BaseResponse; import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ResultVOUtils; import com.glxp.udidl.common.util.ResultVOUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
/**
*
*/
@RestController @RestController
@RequestMapping("udplat/goods") @RequestMapping("udplat/goods")
public class UdplatGoodsController { public class UdplatGoodsController {
@Autowired @Autowired
private UdplatGoodsService udplatGoodsService; private UdplatGoodsService udplatGoodsService;
@AuthRuleAnnotation("udidl_udplatGoods_all")
@PostMapping("/list")
public BaseResponse getList(@RequestBody BaseParam param)
{
return udplatGoodsService.getList(param);
}
@AuthRuleAnnotation("udidl_udplatGoods_all") @AuthRuleAnnotation("udidl_udplatGoods_all")
@PostMapping("/inport") @PostMapping("/inport")
public BaseResponse importExcel(MultipartFile file,int type){ public BaseResponse importExcel(MultipartFile file,int type){

@ -0,0 +1,24 @@
package com.glxp.udidl.admin.controller.udplat;
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchModel;
import com.glxp.udidl.admin.service.udplat.UdplatGoodsMatchService;
import com.glxp.udidl.common.res.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/udplat/goodsMatch")
public class UdplatGoodsMatchController {
@Autowired
private UdplatGoodsMatchService udplatGoodsMatchService;
@AuthRuleAnnotation("udidl_udplatGoodsMatch_all")
@PostMapping("/save")
public BaseResponse Save(@RequestBody UdplatGoodsMatchModel model){
return udplatGoodsMatchService.Save(model);
}
}

@ -0,0 +1,32 @@
package com.glxp.udidl.admin.controller.udplat;
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel;
import com.glxp.udidl.admin.service.udplat.UdplatHospitalService;
import com.glxp.udidl.common.res.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/udplat/hospital")
public class UdplatHospitalController {
@Autowired
private UdplatHospitalService udplatHospitalService;
@AuthRuleAnnotation("udidl_udplatHospital_all")
@PostMapping("/list")
public BaseResponse getList(@RequestBody BaseParam param){
return udplatHospitalService.getList(param);
}
@AuthRuleAnnotation("udidl_udplatHospital_all")
@PostMapping("/import")
public BaseResponse imports(@RequestBody List<UdplatHospitalModel> models){
return udplatHospitalService.imports(models);
}
}

@ -0,0 +1,24 @@
package com.glxp.udidl.admin.controller.udplat;
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
import com.glxp.udidl.admin.req.udid.JobLogFilterRequest;
import com.glxp.udidl.admin.service.udplat.UdplatLogService;
import com.glxp.udidl.common.res.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/udplat/log")
public class UdplatLogController {
@Autowired
UdplatLogService udplatLogService;
@AuthRuleAnnotation("udidl_udplatLog_all")
@PostMapping("/list")
public BaseResponse getList(@RequestBody JobLogFilterRequest param){
return udplatLogService.getList(param);
}
}

@ -0,0 +1,32 @@
package com.glxp.udidl.admin.controller.udplat;
import com.glxp.udidl.admin.annotation.AuthRuleAnnotation;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel;
import com.glxp.udidl.admin.service.udplat.UdplatManufactureService;
import com.glxp.udidl.common.res.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/udplat/manufacture")
public class UdplatManufactureController {
@Autowired
private UdplatManufactureService udplatManufactureService;
@AuthRuleAnnotation("udidl_udplatManufacture_all")
@PostMapping("/list")
public BaseResponse getList(@RequestBody BaseParam param){
return udplatManufactureService.getList(param);
}
@AuthRuleAnnotation("udidl_udplatManufacture_all")
@PostMapping("/import")
public BaseResponse imports(@RequestBody List<UdplatManufactureModel> models){
return udplatManufactureService.imports(models);
}
}

@ -0,0 +1,24 @@
package com.glxp.udidl.admin.dao.udplat;
//import com.glxp.udidl.admin.entity.udplat.UdplatDistributor;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.entity.udplat.UdplatDistributor;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface UdplatDistributorMapper {
int deleteByPrimaryKey(Integer id);
int insert(UdplatDistributor record);
UdplatDistributor selectByPrimaryKey(Integer id);
List<UdplatDistributor> selectAll();
int updateByPrimaryKey(UdplatDistributor record);
List<UdplatDistributor> list(BaseParam param);
UdplatDistributor selectByDistributorId(String id);
}

@ -1,5 +1,6 @@
package com.glxp.udidl.admin.dao.udplat; package com.glxp.udidl.admin.dao.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.entity.udplat.UdplatGoods; import com.glxp.udidl.admin.entity.udplat.UdplatGoods;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -16,4 +17,5 @@ public interface UdplatGoodsMapper {
List<UdplatGoods> selectAll(); List<UdplatGoods> selectAll();
int update(UdplatGoods record); int update(UdplatGoods record);
List<UdplatGoods> list(BaseParam param);
} }

@ -0,0 +1,20 @@
package com.glxp.udidl.admin.dao.udplat;
import com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface UdplatGoodsMatchMapper {
int deleteByPrimaryKey(Integer id);
int insert(UdplatGoodsMatch record);
UdplatGoodsMatch selectByPrimaryKey(Integer id);
List<UdplatGoodsMatch> selectAll();
int updateByPrimaryKey(UdplatGoodsMatch record);
UdplatGoodsMatch selectByDeviceRecordKey(String id);
}

@ -0,0 +1,22 @@
package com.glxp.udidl.admin.dao.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.entity.udplat.UdplatHospital;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface UdplatHospitalMapper {
int deleteByPrimaryKey(Integer id);
int insert(UdplatHospital record);
UdplatHospital selectByPrimaryKey(Integer id);
List<UdplatHospital> selectAll();
int updateByPrimaryKey(UdplatHospital record);
List<UdplatHospital> list(BaseParam param);
UdplatHospital selectByPurchaseId(String id);
}

@ -0,0 +1,22 @@
package com.glxp.udidl.admin.dao.udplat;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.req.udid.JobLogFilterRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface UdplatLogMapper {
int deleteByPrimaryKey(Integer id);
int insert(UdplatLog record);
UdplatLog selectByPrimaryKey(Integer id);
List<UdplatLog> selectAll();
int updateByPrimaryKey(UdplatLog record);
List<UdplatLog> list(JobLogFilterRequest jobLogFilterRequest);
}

@ -0,0 +1,22 @@
package com.glxp.udidl.admin.dao.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.entity.udplat.UdplatManufacture;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface UdplatManufactureMapper {
int deleteByPrimaryKey(Integer id);
int insert(UdplatManufacture record);
UdplatManufacture selectByPrimaryKey(Integer id);
List<UdplatManufacture> selectAll();
int updateByPrimaryKey(UdplatManufacture record);
List<UdplatManufacture> list(BaseParam param);
UdplatManufacture selectByManufactureId(String id);
}

@ -0,0 +1,12 @@
package com.glxp.udidl.admin.dto.udplat;
import com.glxp.udidl.admin.req.ListPageRequest;
import lombok.Data;
@Data
public class BaseParam extends ListPageRequest {
private String startDate;//开始日期
private String endDate;//结束日期
private String name;//名称,支持模糊查询
}

@ -0,0 +1,21 @@
package com.glxp.udidl.admin.dto.udplat;
import lombok.Data;
@Data
public class UdplatDistributorModel {
/**
* id
*/
private String distributorId;
/**
*
*/
private String distributorCode;
/**
*
*/
private String distributorName;
}

@ -0,0 +1,21 @@
package com.glxp.udidl.admin.dto.udplat;
import lombok.Data;
@Data
public class UdplatGoodsMatchModel {
/**
* ID
*/
private String deviceRecordKey;
/**
* id
*/
private Integer deliveryGoodId;
/**
*
*/
private String medicalCode;
}

@ -0,0 +1,34 @@
package com.glxp.udidl.admin.dto.udplat;
import lombok.Data;
/**
*
*/
@Data
public class UdplatHospitalModel {
/**
* ID
*/
private String purchaseId;
/**
*
*/
private String purchaseCode;
/**
*
*/
private String purchaseName;
/**
*
*/
private String purchaseArea;
/**
* ID
*/
private String purchaseAreaId;
}

@ -0,0 +1,21 @@
package com.glxp.udidl.admin.dto.udplat;
import lombok.Data;
@Data
public class UdplatManufactureModel {
/**
* id
*/
private String manufactureId;
/**
*
*/
private String manufactureCode;
/**
*
*/
private String manufactureName;
}

@ -0,0 +1,50 @@
package com.glxp.udidl.admin.entity.udplat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*
* @author hong
* @date 2022/01/19
*/
@Data
public class UdplatDistributor {
/**
*
*/
private Integer id;
/**
* id
*/
private String distributorId;
/**
*
*/
private String distributorCode;
/**
*
*/
private String distributorName;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date updateTime;
}

@ -1,5 +1,6 @@
package com.glxp.udidl.admin.entity.udplat; package com.glxp.udidl.admin.entity.udplat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@ -37,6 +38,8 @@ public class UdplatGoods {
private String proxyName;//申报企业名称/ varchar(50) private String proxyName;//申报企业名称/ varchar(50)
private Integer onlineStatus;//挂网状态 1挂网2挂网状态为空 6 撤销申报 private Integer onlineStatus;//挂网状态 1挂网2挂网状态为空 6 撤销申报
private String medicalCode;//医保编码 private String medicalCode;//医保编码
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;//创建时间 private Date createTime;//创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date updateTime;//最后更新时间 private Date updateTime;//最后更新时间
} }

@ -0,0 +1,49 @@
package com.glxp.udidl.admin.entity.udplat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*
* @author hong
* @date 2022/01/19
*/
@Data
public class UdplatGoodsMatch {
/**
*
*/
private Integer id;
/**
* ID
*/
private String deviceRecordKey;
/**
* id
*/
private Integer deliveryGoodId;
/**
*
*/
private String medicalCode;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date updateTime;
}

@ -0,0 +1,59 @@
package com.glxp.udidl.admin.entity.udplat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*
* @author hong
* @date 2022/01/19
*/
@Data
public class UdplatHospital {
/**
*
*/
private Integer id;
/**
* ID
*/
private String purchaseId;
/**
*
*/
private String purchaseCode;
/**
*
*/
private String purchaseName;
/**
*
*/
private String purchaseArea;
/**
* ID
*/
private String purchaseAreaId;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date updateTime;
}

@ -0,0 +1,64 @@
package com.glxp.udidl.admin.entity.udplat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*
* @author hong
* @date 2022/01/19
*/
@Data
public class UdplatLog {
/**
*
*/
private Integer id;
/**
* : error; info; warning ...
*/
private String type;
/**
* auto(),manual(),import
*/
private String downloadType;
/**
*
*/
private String tbName;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date actionDate;
/**
*
*/
private Integer totalCount;
/**
*
*/
private String msg;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private String content;
}

@ -0,0 +1,49 @@
package com.glxp.udidl.admin.entity.udplat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
*
*
* @author hong
* @date 2022/01/19
*/
@Data
public class UdplatManufacture {
/**
*
*/
private Integer id;
/**
* id
*/
private String manufactureId;
/**
*
*/
private String manufactureCode;
/**
*
*/
private String manufactureName;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date updateTime;
}

@ -1,6 +1,5 @@
package com.glxp.udidl.admin.service.DataSync; package com.glxp.udidl.admin.service.DataSync;
import com.alibaba.fastjson.JSON;
import com.glxp.udidl.admin.entity.udid.*; import com.glxp.udidl.admin.entity.udid.*;
import com.glxp.udidl.admin.res.udid.DataSetResult; import com.glxp.udidl.admin.res.udid.DataSetResult;
import com.glxp.udidl.admin.service.inout.DeviceService; import com.glxp.udidl.admin.service.inout.DeviceService;
@ -52,7 +51,7 @@ public class DeviceSaveService {
Boolean isHistory = false; Boolean isHistory = false;
if (item.getDeviceHistoryKey() != null && !item.getDeviceHistoryKey().isEmpty()) { if (item.getDeviceHistoryKey() != null && !item.getDeviceHistoryKey().isEmpty()) {
isHistory = true; isHistory = true;
System.out.println(JSON.toJSONString(ds)); //System.out.println(JSON.toJSONString(ds));
} }
device.setUuid(uuid); device.setUuid(uuid);
if (requestDate != null) if (requestDate != null)
@ -198,7 +197,7 @@ public class DeviceSaveService {
device.setYbbm(dataSetBean.getYbbm()); device.setYbbm(dataSetBean.getYbbm());
device.setYlqxzcrbarmc(dataSetBean.getYlqxzcrbarmc()); device.setYlqxzcrbarmc(dataSetBean.getYlqxzcrbarmc());
device.setYlqxzcrbarywmc(dataSetBean.getYlqxzcrbarywmc()); device.setYlqxzcrbarywmc(dataSetBean.getYlqxzcrbarywmc());
device.setZczbhhzbapzbh(dataSetBean.getZczbhhzbapzbh()); device.setZczbhhzbapzbh(getString(dataSetBean.getZczbhhzbapzbh()));
device.setZdcfsycs(dataSetBean.getZdcfsycs()); device.setZdcfsycs(dataSetBean.getZdcfsycs());
device.setYflbm(dataSetBean.getYflbm()); device.setYflbm(dataSetBean.getYflbm());
device.setZxxsdycpbs(dataSetBean.getZxxsdycpbs()); device.setZxxsdycpbs(dataSetBean.getZxxsdycpbs());
@ -255,5 +254,9 @@ public class DeviceSaveService {
UUID uuid = UUID.randomUUID(); UUID uuid = UUID.randomUUID();
return uuid.toString().replace("-", ""); return uuid.toString().replace("-", "");
} }
private String getString(String s){
if(s != null && s!= "")
return s.length()>255 ? s.substring(0,255) : s;
else return s;
}
} }

@ -0,0 +1,68 @@
package com.glxp.udidl.admin.service.DataSync;
import com.glxp.udidl.admin.util.Md5Utils;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
@Service
public class UdplatDownloadService {
private String host="http://120.32.125.20";//"http://pre.udplat.org/deal";
private String appId="10000090";
private String secretKey="XTMNpBExNF66bS4";
private String userName="诏安县医院";
private long getTime(){
return System.currentTimeMillis();
}
private String getSign(String time){
TreeMap<String,String> map= new TreeMap<>();
map.put("appId",appId);
map.put("userName", URLEncoder.encode(userName));
map.put("time",time);
map.put("secretKey",secretKey);
StringBuffer sb = new StringBuffer();
for(Map.Entry<String,String> entry:map.entrySet()){
sb.append(entry.getKey()+"="+entry.getValue());
sb.append("&");
}
String str = sb.toString();
String str0 = str.substring(0,str.length()-1);
System.out.println("签名前:"+str0);
String result = Md5Utils.stringToMD5(str0);
System.out.println("签名:"+result);
return result;
}
private Map<String, String> getHeader(){
Map<String, String> map = new HashMap<>();
String time = getTime()+"";
time = time.substring(0,time.length()-3);
map.put("appId",appId);
map.put("userName", userName);
map.put("time",time);
map.put("secretKey",secretKey);
map.put("sign",getSign(time));
return map;
}
public String getDistributor(){
String url="/hsapi/purchase/distributors";
String result = post(url,getHeader(),null);
return result;
}
private String post(String url, Map<String, String> headerMap, Object jsonObject) {
HttpHeaders httpHeaders = new HttpHeaders();
for (Map.Entry<String, String> stringStringEntry : headerMap.entrySet()) {
httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue());
}
httpHeaders.add("Content-Type", "application/json");
HttpEntity httpEntity = new HttpEntity(jsonObject, httpHeaders);
RestTemplate restTemplate = new RestTemplate();
String result = restTemplate.postForObject(host+url, httpEntity, String.class);
return result;
}
}

@ -0,0 +1,19 @@
package com.glxp.udidl.admin.service.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel;
import com.glxp.udidl.common.res.BaseResponse;
import java.util.List;
public interface UdplatDistributorService {
BaseResponse getList(BaseParam param);
BaseResponse imports(List<UdplatDistributorModel> models);
/*int insert(UdplatDistributor record);
UdplatDistributor selectByPrimaryKey(Integer id);
List<UdplatDistributor> selectAll();
int updateByPrimaryKey(UdplatDistributor record);*/
}

@ -0,0 +1,8 @@
package com.glxp.udidl.admin.service.udplat;
import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchModel;
import com.glxp.udidl.common.res.BaseResponse;
public interface UdplatGoodsMatchService {
BaseResponse Save(UdplatGoodsMatchModel model);
}

@ -1,10 +1,12 @@
package com.glxp.udidl.admin.service.udplat; package com.glxp.udidl.admin.service.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.common.res.BaseResponse; import com.glxp.udidl.common.res.BaseResponse;
import java.io.InputStream; import java.io.InputStream;
public interface UdplatGoodsService { public interface UdplatGoodsService {
BaseResponse getList(BaseParam param);
/** /**
* excel * excel
* @param is * @param is

@ -0,0 +1,12 @@
package com.glxp.udidl.admin.service.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel;
import com.glxp.udidl.common.res.BaseResponse;
import java.util.List;
public interface UdplatHospitalService {
BaseResponse getList(BaseParam param);
BaseResponse imports(List<UdplatHospitalModel> models);
}

@ -0,0 +1,10 @@
package com.glxp.udidl.admin.service.udplat;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.req.udid.JobLogFilterRequest;
import com.glxp.udidl.common.res.BaseResponse;
public interface UdplatLogService {
BaseResponse getList(JobLogFilterRequest param);
int insert(UdplatLog udplatLog);
}

@ -0,0 +1,12 @@
package com.glxp.udidl.admin.service.udplat;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel;
import com.glxp.udidl.common.res.BaseResponse;
import java.util.List;
public interface UdplatManufactureService {
BaseResponse getList(BaseParam param);
BaseResponse imports(List<UdplatManufactureModel> models);
}

@ -0,0 +1,70 @@
package com.glxp.udidl.admin.service.udplat.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.glxp.udidl.admin.dao.udplat.UdplatDistributorMapper;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatDistributorModel;
import com.glxp.udidl.admin.entity.udplat.UdplatDistributor;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.res.PageSimpleResponse;
import com.glxp.udidl.admin.service.udplat.UdplatDistributorService;
import com.glxp.udidl.admin.service.udplat.UdplatLogService;
import com.glxp.udidl.admin.util.BeanUtils;
import com.glxp.udidl.admin.util.DateUtil;
import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ResultVOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class UdplatDistributorServiceImpl implements UdplatDistributorService {
@Autowired
private UdplatDistributorMapper mapper;
@Autowired
private UdplatLogService logService;
@Override
public BaseResponse getList(BaseParam param) {
PageHelper.startPage(param.getPage(), param.getLimit());
if (param.getEndDate() != null && !param.getEndDate().isEmpty())
param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1)));
List<UdplatDistributor> list = mapper.list(param);
PageInfo<UdplatDistributor> pageInfo = new PageInfo<>(list);
PageSimpleResponse<UdplatDistributor> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
@Override
public BaseResponse imports(List<UdplatDistributorModel> models) {
if (models != null && models.size() > 0) {
for (UdplatDistributorModel item : models) {
UdplatDistributor entity = mapper.selectByDistributorId(item.getDistributorId());
if (entity == null) {
BeanUtils.copyProperties(item, entity);
entity.setCreateTime(new Date());
mapper.insert(entity);
}else
{
BeanUtils.copyProperties(item, entity);
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKey(entity);
}
}
}
UdplatLog udplatLog = new UdplatLog();
udplatLog.setDownloadType("import");
udplatLog.setTbName("udplat_distributor");
udplatLog.setType("info");
udplatLog.setMsg("执行成功!");
udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate()));
udplatLog.setTotalCount(models.size());
udplatLog.setCreateTime(new Date());
logService.insert(udplatLog);
return ResultVOUtils.success();
}
}

@ -0,0 +1,37 @@
package com.glxp.udidl.admin.service.udplat.impl;
import com.glxp.udidl.admin.dao.udplat.UdplatGoodsMatchMapper;
import com.glxp.udidl.admin.dto.udplat.UdplatGoodsMatchModel;
import com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch;
import com.glxp.udidl.admin.service.udplat.UdplatGoodsMatchService;
import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@Service
public class UdplatGoodsMatchServiceImpl implements UdplatGoodsMatchService {
@Autowired
private UdplatGoodsMatchMapper udplatGoodsMatchMapper;
@Override
public BaseResponse Save(UdplatGoodsMatchModel model) {
UdplatGoodsMatch udplatGoodsMatch = udplatGoodsMatchMapper.selectByDeviceRecordKey(model.getDeviceRecordKey());
if(udplatGoodsMatch == null){
udplatGoodsMatch = new UdplatGoodsMatch();
BeanUtils.copyProperties(model,udplatGoodsMatch);
udplatGoodsMatch.setCreateTime(new Date());
udplatGoodsMatchMapper.insert(udplatGoodsMatch);
}else
{
udplatGoodsMatch.setDeliveryGoodId(model.getDeliveryGoodId());
udplatGoodsMatch.setMedicalCode(model.getMedicalCode());
udplatGoodsMatch.setUpdateTime(new Date());
udplatGoodsMatchMapper.updateByPrimaryKey(udplatGoodsMatch);
}
return ResultVOUtils.success();
}
}

@ -1,11 +1,18 @@
package com.glxp.udidl.admin.service.udplat.impl; package com.glxp.udidl.admin.service.udplat.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.glxp.udidl.admin.dao.udplat.UdplatGoodsMapper; import com.glxp.udidl.admin.dao.udplat.UdplatGoodsMapper;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.DeliveryGoods; import com.glxp.udidl.admin.dto.udplat.DeliveryGoods;
import com.glxp.udidl.admin.dto.udplat.HospitalGoods; import com.glxp.udidl.admin.dto.udplat.HospitalGoods;
import com.glxp.udidl.admin.entity.udplat.UdplatGoods; import com.glxp.udidl.admin.entity.udplat.UdplatGoods;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.res.PageSimpleResponse;
import com.glxp.udidl.admin.service.udplat.UdplatGoodsService; import com.glxp.udidl.admin.service.udplat.UdplatGoodsService;
import com.glxp.udidl.admin.service.udplat.UdplatLogService;
import com.glxp.udidl.admin.util.BeanUtils; import com.glxp.udidl.admin.util.BeanUtils;
import com.glxp.udidl.admin.util.DateUtil;
import com.glxp.udidl.common.res.BaseResponse; import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ExcelUtil; import com.glxp.udidl.common.util.ExcelUtil;
import com.glxp.udidl.common.util.ResultVOUtils; import com.glxp.udidl.common.util.ResultVOUtils;
@ -14,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.InputStream; import java.io.InputStream;
import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
@ -21,6 +29,20 @@ import java.util.List;
public class UdplatGoodsServiceImpl implements UdplatGoodsService { public class UdplatGoodsServiceImpl implements UdplatGoodsService {
@Autowired @Autowired
private UdplatGoodsMapper udplatGoodsMapper; private UdplatGoodsMapper udplatGoodsMapper;
@Autowired
private UdplatLogService logService;
public BaseResponse getList(BaseParam param){
PageHelper.startPage(param.getPage(), param.getLimit());
if (param.getEndDate() != null && !param.getEndDate().isEmpty())
param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1)));
List<UdplatGoods> list = udplatGoodsMapper.list(param);
PageInfo<UdplatGoods> pageInfo = new PageInfo<>(list);
PageSimpleResponse<UdplatGoods> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
@Override @Override
public BaseResponse importExcel(InputStream is, int type) { public BaseResponse importExcel(InputStream is, int type) {
List<UdplatGoods> list; List<UdplatGoods> list;
@ -37,6 +59,14 @@ public class UdplatGoodsServiceImpl implements UdplatGoodsService {
return ResultVOUtils.error(-1,"文件类型不匹配!"); return ResultVOUtils.error(-1,"文件类型不匹配!");
return save(list); return save(list);
}catch (Exception e){ }catch (Exception e){
UdplatLog udplatLog = new UdplatLog();
udplatLog.setDownloadType("import");
udplatLog.setTbName("udplat_goods");
udplatLog.setType("error");
udplatLog.setMsg(e.getMessage());
udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate()));
udplatLog.setCreateTime(new Date());
logService.insert(udplatLog);
return ResultVOUtils.error(-1,"转换格式出错:"+e.getMessage()); return ResultVOUtils.error(-1,"转换格式出错:"+e.getMessage());
} }
@ -53,7 +83,6 @@ public class UdplatGoodsServiceImpl implements UdplatGoodsService {
private BaseResponse save(List<UdplatGoods> list){ private BaseResponse save(List<UdplatGoods> list){
if(list == null || list.size()<1) if(list == null || list.size()<1)
return ResultVOUtils.error(-1,"无数据!"); return ResultVOUtils.error(-1,"无数据!");
//log.info("数据:"+JSONUtil.toJsonStr(list));
int count=0; int count=0;
for(UdplatGoods item:list){ for(UdplatGoods item:list){
String goodId = item.getDeliveryGoodId(); String goodId = item.getDeliveryGoodId();
@ -63,12 +92,23 @@ public class UdplatGoodsServiceImpl implements UdplatGoodsService {
if(goods != null) if(goods != null)
{ {
BeanUtils.copyProperties(item,goods); BeanUtils.copyProperties(item,goods);
goods.setUpdateTime(new Date());
udplatGoodsMapper.update(goods); udplatGoodsMapper.update(goods);
}else }else
item.setUuid(BeanUtils.getUUId()); item.setUuid(BeanUtils.getUUId());
item.setCreateTime(new Date());
udplatGoodsMapper.insert(item); udplatGoodsMapper.insert(item);
count++; count++;
} }
UdplatLog udplatLog = new UdplatLog();
udplatLog.setDownloadType("import");
udplatLog.setTbName("udplat_goods");
udplatLog.setType("info");
udplatLog.setMsg("执行成功!");
udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate()));
udplatLog.setTotalCount(count);
udplatLog.setCreateTime(new Date());
logService.insert(udplatLog);
return ResultVOUtils.success(count); return ResultVOUtils.success(count);
} }
} }

@ -0,0 +1,74 @@
package com.glxp.udidl.admin.service.udplat.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.glxp.udidl.admin.dao.udplat.UdplatHospitalMapper;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatHospitalModel;
import com.glxp.udidl.admin.entity.udplat.UdplatHospital;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.res.PageSimpleResponse;
import com.glxp.udidl.admin.service.udplat.UdplatHospitalService;
import com.glxp.udidl.admin.service.udplat.UdplatLogService;
import com.glxp.udidl.admin.util.BeanUtils;
import com.glxp.udidl.admin.util.DateUtil;
import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ResultVOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class UdplatHospitalServiceImpl implements UdplatHospitalService {
@Autowired
private UdplatHospitalMapper mapper;
@Autowired
private UdplatLogService logService;
@Override
public BaseResponse getList(BaseParam param) {
PageHelper.startPage(param.getPage(), param.getLimit());
if (param.getEndDate() != null && !param.getEndDate().isEmpty())
param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1)));
List<UdplatHospital> list = mapper.list(param);
PageInfo<UdplatHospital> pageInfo = new PageInfo<>(list);
PageSimpleResponse<UdplatHospital> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
@Override
public BaseResponse imports(List<UdplatHospitalModel> models) {
if (models != null && models.size() > 0) {
for (UdplatHospitalModel item : models) {
UdplatHospital entity = mapper.selectByPurchaseId(item.getPurchaseId());
if (entity == null) {
BeanUtils.copyProperties(item, entity);
entity.setCreateTime(new Date());
mapper.insert(entity);
}else
{
BeanUtils.copyProperties(item, entity);
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKey(entity);
}
}
}
UdplatLog udplatLog = new UdplatLog();
udplatLog.setDownloadType("import");
udplatLog.setTbName("udplat_hospital");
udplatLog.setType("info");
udplatLog.setMsg("执行成功!");
udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate()));
udplatLog.setTotalCount(models.size());
udplatLog.setCreateTime(new Date());
logService.insert(udplatLog);
return ResultVOUtils.success();
}
}

@ -0,0 +1,39 @@
package com.glxp.udidl.admin.service.udplat.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.glxp.udidl.admin.dao.udplat.UdplatLogMapper;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.req.udid.JobLogFilterRequest;
import com.glxp.udidl.admin.res.PageSimpleResponse;
import com.glxp.udidl.admin.service.udplat.UdplatLogService;
import com.glxp.udidl.admin.util.DateUtil;
import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ResultVOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class UdplatLogServiceImpl implements UdplatLogService {
@Autowired
private UdplatLogMapper mapper;
@Override
public BaseResponse getList(JobLogFilterRequest param) {
PageHelper.startPage(param.getPage(), param.getLimit());
if (param.getEndDate() != null && !param.getEndDate().isEmpty())
param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1)));
List<UdplatLog> list = mapper.list(param);
PageInfo<UdplatLog> pageInfo = new PageInfo<>(list);
PageSimpleResponse<UdplatLog> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
@Override
public int insert(UdplatLog udplatLog) {
return mapper.insert(udplatLog);
}
}

@ -0,0 +1,70 @@
package com.glxp.udidl.admin.service.udplat.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.glxp.udidl.admin.dao.udplat.UdplatManufactureMapper;
import com.glxp.udidl.admin.dto.udplat.BaseParam;
import com.glxp.udidl.admin.dto.udplat.UdplatManufactureModel;
import com.glxp.udidl.admin.entity.udplat.UdplatLog;
import com.glxp.udidl.admin.entity.udplat.UdplatManufacture;
import com.glxp.udidl.admin.res.PageSimpleResponse;
import com.glxp.udidl.admin.service.udplat.UdplatLogService;
import com.glxp.udidl.admin.service.udplat.UdplatManufactureService;
import com.glxp.udidl.admin.util.BeanUtils;
import com.glxp.udidl.admin.util.DateUtil;
import com.glxp.udidl.common.res.BaseResponse;
import com.glxp.udidl.common.util.ResultVOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class UdplatManufactureServiceImpl implements UdplatManufactureService {
@Autowired
private UdplatManufactureMapper mapper;
@Autowired
private UdplatLogService logService;
@Override
public BaseResponse getList(BaseParam param) {
PageHelper.startPage(param.getPage(), param.getLimit());
if (param.getEndDate() != null && !param.getEndDate().isEmpty())
param.setEndDate(DateUtil.formatDate(DateUtil.addDays(DateUtil.parseDate(param.getEndDate()), 1)));
List<UdplatManufacture> list = mapper.list(param);
PageInfo<UdplatManufacture> pageInfo = new PageInfo<>(list);
PageSimpleResponse<UdplatManufacture> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
@Override
public BaseResponse imports(List<UdplatManufactureModel> models) {
if (models != null && models.size() > 0) {
for (UdplatManufactureModel item : models) {
UdplatManufacture entity = mapper.selectByManufactureId(item.getManufactureId());
if (entity == null) {
BeanUtils.copyProperties(item, entity);
entity.setCreateTime(new Date());
mapper.insert(entity);
}else
{
BeanUtils.copyProperties(item, entity);
entity.setUpdateTime(new Date());
mapper.updateByPrimaryKey(entity);
}
}
}
UdplatLog udplatLog = new UdplatLog();
udplatLog.setDownloadType("import");
udplatLog.setTbName("udplat_manufacture");
udplatLog.setType("info");
udplatLog.setMsg("执行成功!");
udplatLog.setActionDate(DateUtil.parseDate(DateUtil.getDate()));
udplatLog.setTotalCount(models.size());
udplatLog.setCreateTime(new Date());
logService.insert(udplatLog);
return ResultVOUtils.success();
}
}

@ -16,5 +16,6 @@ UDIC_MIPSDOWNLOAD_URL = http://127.0.0.1:8080/UDIC_MIPSDL_Server
#UDIC_MIPSDOWNLOAD_URL=http://127.0.0.1:9997 #UDIC_MIPSDOWNLOAD_URL=http://127.0.0.1:9997
config.downloadPath=E:/temp config.downloadPath=E:/temp
config.openAuth=true config.openAuth=true
config.
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB spring.servlet.multipart.max-request-size=1000MB

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udidl.admin.dao.udplat.UdplatDistributorMapper">
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatDistributor">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="distributorId" jdbcType="INTEGER" property="distributorId"/>
<result column="distributorCode" jdbcType="VARCHAR" property="distributorCode"/>
<result column="distributorName" jdbcType="VARCHAR" property="distributorName"/>
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from udplat_distributor
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatDistributor">
insert into udplat_distributor (id, distributorId, distributorCode,
distributorName, createTime)
values (#{id,jdbcType=INTEGER}, #{distributorId,jdbcType=INTEGER}, #{distributorCode,jdbcType=VARCHAR},
#{distributorName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<update id="updateByPrimaryKey" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatDistributor">
update udplat_distributor
set distributorId = #{distributorId,jdbcType=INTEGER},
distributorCode = #{distributorCode,jdbcType=VARCHAR},
distributorName = #{distributorName,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, distributorId, distributorCode, distributorName, createTime, updateTime
from udplat_distributor
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, distributorId, distributorCode, distributorName, createTime, updateTime
from udplat_distributor
</select>
<select id="list" resultMap="BaseResultMap" parameterType="com.glxp.udidl.admin.dto.udplat.BaseParam">
select id, distributorId, distributorCode, distributorName, createTime, updateTime
from udplat_distributor
<where>
<if test="name != '' and name != null">
and distributorName like concat('%',#{name},'%')
</if>
<if test="startDate != '' and startDate != null">
and createTime >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
and createTime &lt;= #{endDate}
</if>
</where>
order by if(ISNULL(updateTime),createTime,updateTime) DESC
</select>
<select id="selectByDistributorId" parameterType="java.lang.String" resultMap="BaseResultMap">
select id, distributorId, distributorCode, distributorName, createTime, updateTime
from udplat_distributor
where distributorId = #{id}
</select>
</mapper>

@ -119,4 +119,25 @@
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
from udplat_goods from udplat_goods
</select> </select>
<select id="list" resultMap="BaseResultMap" parameterType="com.glxp.udidl.admin.dto.udplat.BaseParam">
select id, uuid, deliveryGoodId, projectGoodsCode, deliveryGoodsCode, manufactureId,
manufactureName, distributorId, distributorName, productName, compId, model, spec,
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
from udplat_goods
<where>
<if test="name != '' and name != null">
and productName like concat('%',#{name},'%')
</if>
<if test="startDate != '' and startDate != null">
and createTime >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
and createTime &lt;= #{endDate}
</if>
</where>
order by if(ISNULL(updateTime),createTime,updateTime) DESC
</select>
</mapper> </mapper>

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udidl.admin.dao.udplat.UdplatGoodsMatchMapper">
<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="deliveryGoodId" jdbcType="INTEGER" property="deliveryGoodId" />
<result column="medicalCode" jdbcType="VARCHAR" property="medicalCode" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from udplat_goods_match
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch">
insert into udplat_goods_match (id, deviceRecordKey, deliveryGoodId,
medicalCode, createTime
)
values (#{id,jdbcType=INTEGER}, #{deviceRecordKey,jdbcType=VARCHAR}, #{deliveryGoodId,jdbcType=INTEGER},
#{medicalCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoodsMatch">
update udplat_goods_match
set deviceRecordKey = #{deviceRecordKey,jdbcType=VARCHAR},
<if test="deliveryGoodId != null and deliveryGoodId !='' ">
deliveryGoodId = #{deliveryGoodId,jdbcType=INTEGER},
</if>
<if test="medicalCode != null and medicalCode !='' ">
medicalCode = #{medicalCode,jdbcType=VARCHAR},
</if>
updateTime = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, deviceRecordKey, deliveryGoodId, medicalCode, createTime, updateTime
from udplat_goods_match
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, deviceRecordKey, deliveryGoodId, medicalCode, createTime, updateTime
from udplat_goods_match
</select>
<select id="selectByDeviceRecordKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select id, deviceRecordKey, deliveryGoodId, medicalCode, createTime, updateTime
from udplat_goods_match
where deviceRecordKey = #{id}
</select>
</mapper>

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udidl.admin.dao.udplat.UdplatHospitalMapper">
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatHospital">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="purchaseId" jdbcType="VARCHAR" property="purchaseId" />
<result column="purchaseCode" jdbcType="VARCHAR" property="purchaseCode" />
<result column="purchaseName" jdbcType="VARCHAR" property="purchaseName" />
<result column="purchaseArea" jdbcType="VARCHAR" property="purchaseArea" />
<result column="purchaseAreaId" jdbcType="VARCHAR" property="purchaseAreaId" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from udplat_hospital
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatHospital">
insert into udplat_hospital (id, purchaseId, purchaseCode,
purchaseName, purchaseArea, purchaseAreaId,
createTime, updateTime)
values (#{id,jdbcType=INTEGER}, #{purchaseId,jdbcType=VARCHAR}, #{purchaseCode,jdbcType=VARCHAR},
#{purchaseName,jdbcType=VARCHAR}, #{purchaseArea,jdbcType=VARCHAR}, #{purchaseAreaId,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<update id="updateByPrimaryKey" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatHospital">
update udplat_hospital
set purchaseId = #{purchaseId,jdbcType=VARCHAR},
purchaseCode = #{purchaseCode,jdbcType=VARCHAR},
purchaseName = #{purchaseName,jdbcType=VARCHAR},
purchaseArea = #{purchaseArea,jdbcType=VARCHAR},
purchaseAreaId = #{purchaseAreaId,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, purchaseId, purchaseCode, purchaseName, purchaseArea, purchaseAreaId,
createTime, updateTime
from udplat_hospital
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, purchaseId, purchaseCode, purchaseName, purchaseArea, purchaseAreaId,
createTime, updateTime
from udplat_hospital
</select>
<select id="list" resultMap="BaseResultMap" parameterType="com.glxp.udidl.admin.dto.udplat.BaseParam">
select id, purchaseId, purchaseCode, purchaseName, purchaseArea, purchaseAreaId,
createTime, updateTime
from udplat_hospital
<where>
<if test="name != '' and name != null">
and distributorName like concat('%',#{name},'%')
</if>
<if test="startDate != '' and startDate != null">
and createTime >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
and createTime &lt;= #{endDate}
</if>
</where>
order by if(ISNULL(updateTime),createTime,updateTime) DESC
</select>
<select id="selectByPurchaseId" parameterType="java.lang.String" resultMap="BaseResultMap">
select id, purchaseId, purchaseCode, purchaseName, purchaseArea, purchaseAreaId,
createTime, updateTime
from udplat_hospital
where purchaseId = #{id}
</select>
</mapper>

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udidl.admin.dao.udplat.UdplatLogMapper">
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatLog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="downloadType" jdbcType="VARCHAR" property="downloadType" />
<result column="tbName" jdbcType="VARCHAR" property="tbName" />
<result column="actionDate" jdbcType="TIMESTAMP" property="actionDate" />
<result column="totalCount" jdbcType="INTEGER" property="totalCount" />
<result column="msg" jdbcType="VARCHAR" property="msg" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="content" jdbcType="LONGVARCHAR" property="content" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from udplat_log
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatLog">
insert into udplat_log (id, type, downloadType,
tbName, actionDate, totalCount,
msg, createTime, content
)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{downloadType,jdbcType=VARCHAR},
#{tbName,jdbcType=VARCHAR}, #{actionDate,jdbcType=TIMESTAMP}, #{totalCount,jdbcType=INTEGER},
#{msg,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatLog">
update udplat_log
set type = #{type,jdbcType=VARCHAR},
downloadType = #{downloadType,jdbcType=VARCHAR},
tbName = #{tbName,jdbcType=VARCHAR},
actionDate = #{actionDate,jdbcType=TIMESTAMP},
totalCount = #{totalCount,jdbcType=INTEGER},
msg = #{msg,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, type, downloadType, tbName, actionDate, totalCount, msg, createTime, content
from udplat_log
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, type, actionDate, tbName, actionDate, totalCount, msg, createTime, content
from udplat_log
</select>
<select id="list" parameterType="com.glxp.udidl.admin.req.udid.JobLogFilterRequest" resultType="com.glxp.udidl.admin.entity.udplat.UdplatLog">
select * from udplat_log
<where>
<if test="type != '' and type != null">
and type = #{type}
</if>
<if test="downloadType != '' and downloadType != null">
and downloadType = #{downloadType}
</if>
<if test="startDate != '' and startDate != null">
and createTime >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
and createTime &lt;= #{endDate}
</if>
</where>
order by actionDate desc, createTime desc
</select>
</mapper>

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.udidl.admin.dao.udplat.UdplatManufactureMapper">
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatManufacture">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="manufactureId" jdbcType="INTEGER" property="manufactureId" />
<result column="manufactureCode" jdbcType="VARCHAR" property="manufactureCode" />
<result column="manufactureName" jdbcType="VARCHAR" property="manufactureName" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from udplat_manufacture
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatManufacture">
insert into udplat_manufacture (id, manufactureId, manufactureCode,
manufactureName, createTime, updateTime
)
values (#{id,jdbcType=INTEGER}, #{manufactureId,jdbcType=INTEGER}, #{manufactureCode,jdbcType=VARCHAR},
#{manufactureName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatManufacture">
update udplat_manufacture
set manufactureId = #{manufactureId,jdbcType=INTEGER},
manufactureCode = #{manufactureCode,jdbcType=VARCHAR},
manufactureName = #{manufactureName,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select id, manufactureId, manufactureCode, manufactureName, createTime, updateTime
from udplat_manufacture
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, manufactureId, manufactureCode, manufactureName, createTime, updateTime
from udplat_manufacture
</select>
<select id="list" resultMap="BaseResultMap" parameterType="com.glxp.udidl.admin.dto.udplat.BaseParam">
select id, manufactureId, manufactureCode, manufactureName, createTime, updateTime
from udplat_manufacture
<where>
<if test="name != '' and name != null">
and distributorName like concat('%',#{name},'%')
</if>
<if test="startDate != '' and startDate != null">
and createTime >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
and createTime &lt;= #{endDate}
</if>
</where>
order by if(ISNULL(updateTime),createTime,updateTime) DESC
</select>
<select id="selectByManufactureId" parameterType="java.lang.String" resultMap="BaseResultMap">
select id, manufactureId, manufactureCode, manufactureName, createTime, updateTime
from udplat_manufacture
where manufactureId = #{id}
</select>
</mapper>

@ -16,5 +16,6 @@ UDIC_MIPSDOWNLOAD_URL = http://127.0.0.1:8080/UDIC_MIPSDL_Server
#UDIC_MIPSDOWNLOAD_URL=http://127.0.0.1:9997 #UDIC_MIPSDOWNLOAD_URL=http://127.0.0.1:9997
config.downloadPath=E:/temp config.downloadPath=E:/temp
config.openAuth=true config.openAuth=true
config.
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=1000MB spring.servlet.multipart.max-request-size=1000MB
Loading…
Cancel
Save