阳光采购平台基础库信息
parent
f923364674
commit
f8b557ee7e
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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,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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -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 <= #{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>
|
@ -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 <= #{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 <= #{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 <= #{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>
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue