8-01 药品管理

dev_unify
wangwei 8 months ago
parent 09178327d6
commit d1eaf16000

@ -188,6 +188,13 @@ public class AuthUserController extends BaseController {
return ResultVOUtils.error(500, "新密码与确认密码不相同!请重新修改!");
}
}
}
@AuthRuleAnnotation("")
@GetMapping("/admin/auth/admin/selectUser")
public BaseResponse selectUser() {
AuthAdmin authAdmin = customerService.getUserBean();
return ResultVOUtils.success(authAdmin);
}
}

@ -20,9 +20,7 @@ import com.glxp.api.entity.system.CompanyEntity;
import com.glxp.api.entity.thrsys.ThrProductsEntity;
import com.glxp.api.entity.thrsys.ThrSystemEntity;
import com.glxp.api.http.NmpaUdiClient;
import com.glxp.api.req.basic.UdiCombineRequest;
import com.glxp.api.req.basic.ProductInfoFilterRequest;
import com.glxp.api.req.basic.RemoveUdiRelRequest;
import com.glxp.api.req.basic.*;
import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.basic.UdiRelevanceResponse;
@ -367,6 +365,20 @@ public class UdiContrastController {
}
@AuthRuleAnnotation("")
@PostMapping("/udi/udirel/addDrug")
public BaseResponse addDrug(@RequestBody AddProductRequest addProductRequest) {
AddProductRequest udiRelevanceEntity = udiProductService.addDrug(addProductRequest);
return ResultVOUtils.success(udiRelevanceEntity);
}
@PostMapping("/udi/udirel/updateLevelDrug")
public BaseResponse updateLevelDrug(@RequestBody UpdateLevelDrugRequest updateLevelDrugRequest) {
udiProductService.saveOrUpadateLevelDrug(updateLevelDrugRequest);
return ResultVOUtils.success("更新成功");
}
public void updateDi(UdiRelevanceEntity udiRelevanceEntity, String key) {
List<UdiProductEntity> udiInfoEntities = udiDlHttpClient.getOrUpdateByUuid(key);
List<UdiProductEntity> originProductEntities = udiProductService.findByUuids(udiRelevanceEntity.getUuid());

@ -38,6 +38,14 @@ public class IoCodeController extends BaseController {
return ResultVOUtils.page(pageInfo);
}
@GetMapping("/udiwms/inout/code/drug/filterList")
public BaseResponse filterDrugList(FilterCodeRequest filterCodeRequest) {
List<IoCodeResponse> list = ioCodeService.filterDrugList(filterCodeRequest);
PageInfo<IoCodeResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}
/**
*
*

@ -190,6 +190,7 @@ public class IoOrderController extends BaseController {
if (StringUtils.isNotBlank(addOrderRequest.getRemark())) {
orderEntity.setRemark(addOrderRequest.getRemark());
}
orderEntity.setProductType(addOrderRequest.getProductType());
BaseResponse tempResponse = checkSubmitEnable(orderEntity);
if (tempResponse != null)
return tempResponse;
@ -234,6 +235,7 @@ public class IoOrderController extends BaseController {
if (StringUtils.isNotBlank(addOrderRequest.getRemark())) {
orderEntity.setRemark(addOrderRequest.getRemark());
}
orderEntity.setProductType(addOrderRequest.getProductType());
BaseResponse tempResponse = checkSubmitEnable(orderEntity);
if (tempResponse != null)
return tempResponse;
@ -271,6 +273,7 @@ public class IoOrderController extends BaseController {
orderEntity.setDeptCode(addOrderRequest.getDeptCode());
orderEntity.setBillNo(addOrderRequest.getBillNo());
orderEntity.setInvCode(addOrderRequest.getInvCode());
orderEntity.setProductType(addOrderRequest.getProductType());
orderService.updateByBillNo(orderEntity);
@ -295,6 +298,7 @@ public class IoOrderController extends BaseController {
if (StringUtils.isNotBlank(addOrderRequest.getRemark())) {
orderEntity.setRemark(addOrderRequest.getRemark());
}
orderEntity.setProductType(addOrderRequest.getProductType());
if (StringUtils.isNotBlank(addOrderRequest.getAction())) {
orderEntity.setAction(addOrderRequest.getAction());
orderService.update(orderEntity);

@ -595,6 +595,22 @@ public class IoOrderDetailBizController extends BaseController {
return ResultVOUtils.page(pageInfo);
}
@GetMapping("/udiwms/inout/bizDetail/drug/filterList")
public BaseResponse filterDrugList(FilterOrderDetailBizRequest orderDetailBizRequest) {
List<IoOrderDetailBizResponse> list = orderDetailBizService.filterDrugList(orderDetailBizRequest);
String value = systemParamConfigService.selectValueByParamKey("order_detail_visible");
if (IntUtil.value(value) == 1) {
list = list.stream()
.sorted(Comparator.comparing(IoOrderDetailBizResponse::getNameCode))
.collect(Collectors.toList());
}
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderDetailBizRequest.getOrderIdFk());
ioCheckInoutService.bizOrderCheck2(list, orderDetailCodeEntities);
PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}
// @GetMapping("/udiwms/inout/bizDetail/filterListInv")
// public BaseResponse filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest) {
// List<IoOrderDetailBizResponse> list = orderDetailBizService.getfilterList(orderDetailBizRequest);

@ -70,5 +70,26 @@ public class IoOrderDetailCodeController {
return ResultVOUtils.page(pageInfo);
}
/**
*
*
* @param detailCodeRequest
* @return
*/
@GetMapping("udiwms/inout/codeDetail/drug/filterList")
public BaseResponse filterDrugList(FilterOrderDetailCodeRequest detailCodeRequest) {
List<IoOrderDetailCodeResponse> list = ioOrderDetailCodeService.filterDrugList(detailCodeRequest);
String value = systemParamConfigService.selectValueByParamKey("order_detail_visible");
if (IntUtil.value(value) == 1) {
list = list.stream()
.sorted(Comparator.comparing(IoOrderDetailCodeResponse::getNameCode))
.collect(Collectors.toList());
}
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(detailCodeRequest.getOrderIdFk());
ioCheckInoutService.codeOrderCheck2(list, orderDetailBizEntities);
PageInfo<IoOrderDetailCodeResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}
}

@ -1,7 +1,9 @@
package com.glxp.api.controller.inout;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
@ -9,10 +11,12 @@ import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.Constant;
import com.glxp.api.constant.ConstantType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.auth.AuthCompany;
import com.glxp.api.entity.auth.InvWarehouseEntity;
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
@ -27,6 +31,7 @@ import com.glxp.api.res.inout.CptTraceResultResponse;
import com.glxp.api.res.inout.IoCodeResponse;
import com.glxp.api.res.inout.IoOrderDetailResultResponse;
import com.glxp.api.service.auth.AuthCompanyService;
import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.IBasicBussinessTypeService;
import com.glxp.api.service.inout.*;
import com.glxp.api.service.inout.impl.IoCodeService;
@ -49,6 +54,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.*;
@ -340,4 +347,6 @@ public class IoOrderDetailResultController extends BaseController {
}
}

@ -317,6 +317,23 @@ public class PurOrderController {
}
/**
*
*/
@GetMapping("/purchase/order/drug/list/detail")
public BaseResponse drugDetailList(PurOrderDetailRequest purApplyDetailRequest) {
List<PurOrderDetailResponse> purOrderDetailResponseList = purOrderDetailService.joinQueryDrugList(purApplyDetailRequest);
PageInfo<PurOrderDetailResponse> pageInfo;
pageInfo = new PageInfo<>(purOrderDetailResponseList);
PageSimpleResponse<PurOrderDetailResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(purOrderDetailResponseList);
return ResultVOUtils.success(pageSimpleResponse);
}
/**
*
*/

@ -1,5 +1,6 @@
package com.glxp.api.dao.basic;
import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.UdiInfoRequest;
@ -10,7 +11,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface UdiProductDao {
public interface UdiProductDao extends BaseMapperPlus<UdiProductDao, UdiProductEntity, UdiProductEntity> {
List<UdiProductEntity> filterUdiInfo(FilterUdiRelRequest filterUdiRelRequest);

@ -25,6 +25,7 @@ public interface IoCodeDao extends BaseMapperPlus<IoCodeDao, IoCodeEntity, IoCod
* @return
*/
List<IoCodeResponse> filterList(FilterCodeRequest filterCodeRequest);
List<IoCodeResponse> filterDrugList(FilterCodeRequest filterCodeRequest);
/**
* codesum

@ -21,6 +21,7 @@ public interface IoOrderDetailBizDao extends BaseMapperPlus<IoOrderDetailBizDao,
* @return
*/
List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderDetailBizResponse> filterDrugList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderDetailCodeResponse> getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest);

@ -17,6 +17,7 @@ public interface IoOrderDetailCodeDao extends BaseMapperPlus<IoOrderDetailCodeDa
* @return
*/
List<IoOrderDetailCodeResponse> filterList(FilterOrderDetailCodeRequest detailCodeRequest);
List<IoOrderDetailCodeResponse> filterDrugList(FilterOrderDetailCodeRequest detailCodeRequest);
/**
*

@ -18,6 +18,7 @@ public interface PurOrderDetailDao extends BaseMapper<PurOrderDetailEntity> {
List<PurOrderDetailEntity> queryPageList(PurOrderDetailRequest purOrderDetailRequest);
List<PurOrderDetailResponse> joinQueryList(PurOrderDetailRequest purOrderDetailRequest);
List<PurOrderDetailResponse> joinQueryDrugList(PurOrderDetailRequest purOrderDetailRequest);
Boolean update(PurOrderDetailEntity purOrderDetailEntity);

@ -401,6 +401,12 @@ public class BasicProductsEntity {
@ApiModelProperty(value="三级分类名称(部位、功能、品种)")
private Integer catalogcode3;
/**
*
*/
@TableField(value = "requireScanCode")
private Integer requireScanCode;
/**
*
*/
@ -408,6 +414,92 @@ public class BasicProductsEntity {
@ApiModelProperty(value="耗材材质")
private String matrial;
/**
* 1: 2:
*/
@TableField(value = "productsType")
private Integer productsType;
/**
*
*/
@TableField(value = "levelUnit")
private String levelUnit;
/**
*
*/
@TableField(value = "prepnUnit")
private String prepnUnit;
/**
*
*/
@TableField(value = "packMatrial")
private String packMatrial;
/**
* 使
*/
@TableField(value = "useAttribute")
private String useAttribute;
/**
*
*/
@TableField(value = "transportCondition")
private String transportCondition;
/**
*
*/
@TableField(value = "storageCondition")
private String storageCondition;
/**
*
*/
@TableField(value = "specialCode")
private String specialCode;
/**
* 使
*/
@TableField(value = "indate")
private Date indate;
/**
* () 1239
*/
@TableField(value = "physicType")
private Integer physicType;
/**
*
*/
@TableField(value = "prepnSpec")
private String prepnSpec;
/**
*
*/
@TableField(value = "majorType")
private Integer majorType;
/**
* 1:;2:;3:
*/
@TableField(value = "medicareType")
private Integer medicareType;
public static final String COL_ID = "id";
public static final String COL_UUID = "uuid";

@ -1,6 +1,8 @@
package com.glxp.api.entity.basic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -10,103 +12,314 @@ import java.util.Date;
*
*/
@Data
@TableName("basic_products")
public class UdiProductEntity {
//
// private Long id;
// private String uuid;
// private String originUuid;
// private String nameCode;
// private String deviceRecordKey;
// private String packRatio;
// private String packLevel;
// private String packUnit;
// private Integer bhxjsl;
// private Integer bhzxxsbzsl;
// private Integer zxxsbzbhsydysl;
// private String bhxjcpbm;
// private String bzcj;
// private String cpmctymc;
// private String cplb;
// private String flbm;
// private String ggxh;
// private String qxlb;
// private String tyshxydm;
// private String ylqxzcrbarmc;
// private String zczbhhzbapzbh;
// private String ylqxzcrbarywmc;
// private String sydycpbs;
// private String sjcpbm;
// private Integer versionNumber;
// private Integer diType;
// private String ybbm;
// private String sptm;
// private String manufactory;
// private String manufactoryCode;
// private String measname;
// private Integer productType;
// private String scbssfbhph;
// private String scbssfbhxlh;
// private String scbssfbhscrq;
// private String scbssfbhsxrq;
// private String cpms;
// private Boolean allowNoBatch;
// private Boolean allowNoExpire;
// private Boolean allowNoProduct;
// private Boolean allowNoSerial;
// private String spmc;
// private String cplx;
// private String hchzsb;
// private String cpdls;
// private String basicPrductRemak1;
// private String basicPrductRemak2;
// private String basicPrductRemak3;
// private String basicPrductRemak4;
// private String basicPrductRemak5;
// private String basicPrductRemak6;
// private String basicPrductRemak7;
// private String basicPrductRemak8;
// private String price;
//
//
// private String sfwblztlcp;
// private String cgzmraqxgxx;
// private String sfbjwycxsy;
// private String zdcfsycs;
// private String sfwwjbz;
// private String syqsfxyjxmj;
// private String mjfs;
// private String categoryName;
//
//
// //本地生成信息
// private String batchNo;
// private String produceDate;
// private String expireDate;
// private String serialNo;
// private String udi;
// private String code;
// private Integer count;
// private String warehouseCode;
// private String deptCode;
// private String udplatCode;
// private String relId;//关联ID主键
// private Integer status;
// private String supId;
private Long relSupId;
private Boolean groupBuy;
private Long uid;
private Integer attributeType;
//
private String remark;
private String catalogcode;
//
/**
* (
*/
@TableField(value = "catalogCode1")
@ApiModelProperty(value = "一级分类名称(学科,品名)")
private Integer catalogCode1;
//
/**
* (
*/
@TableField(value = "catalogCode2")
@ApiModelProperty(value = "二级分类名称(用途、品目)")
private Integer catalogCode2;
//
// /**
// * 三级分类名称(部位、功能、品种)
// */
@TableField(value = "catalogCode3")
@ApiModelProperty(value = "三级分类名称(部位、功能、品种)")
private Integer catalogCode3;
//
//
private Boolean isStack;
private Long id;
@TableField(value = "uuid")
private String uuid;
@TableField(value = "originUuid")
private String originUuid;
@TableField(value = "nameCode")
private String nameCode;
@TableField(value = "deviceRecordKey")
private String deviceRecordKey;
@TableField(value = "packRatio")
private String packRatio;
@TableField(value = "packLevel")
private String packLevel;
@TableField(value = "packUnit")
private String packUnit;
@TableField(value = "bhxjsl")
private Integer bhxjsl;
@TableField(value = "bhzxxsbzsl")
private Integer bhzxxsbzsl;
@TableField(value = "zxxsbzbhsydysl")
private Integer zxxsbzbhsydysl;
@TableField(value = "bhxjcpbm")
private String bhxjcpbm;
@TableField(value = "bzcj")
private String bzcj;
@TableField(value = "cpmctymc")
private String cpmctymc;
@TableField(value = "cplb")
private String cplb;
@TableField(value = "flbm")
private String flbm;
@TableField(value = "ggxh")
private String ggxh;
@TableField(value = "qxlb")
private String qxlb;
@TableField(value = "tyshxydm")
private String tyshxydm;
@TableField(value = "ylqxzcrbarmc")
private String ylqxzcrbarmc;
@TableField(value = "zczbhhzbapzbh")
private String zczbhhzbapzbh;
@TableField(value = "ylqxzcrbarywmc")
private String ylqxzcrbarywmc;
@TableField(value = "sydycpbs")
private String sydycpbs;
@TableField(value = "sjcpbm")
private String sjcpbm;
@TableField(value = "versionNumber")
private Integer versionNumber;
@TableField(value = "diType")
private Integer diType;
@TableField(value = "ybbm")
private String ybbm;
@TableField(value = "sptm")
private String sptm;
@TableField(value = "manufactory")
private String manufactory;
private String manufactoryCode;
@TableField(value = "measname")
private String measname;
@TableField(value = "productType")
private Integer productType;
@TableField(value = "scbssfbhph")
private String scbssfbhph;
@TableField(value = "scbssfbhxlh")
private String scbssfbhxlh;
@TableField(value = "scbssfbhscrq")
private String scbssfbhscrq;
@TableField(value = "scbssfbhsxrq")
private String scbssfbhsxrq;
@TableField(value = "cpms")
private String cpms;
@TableField(value = "allowNoBatch")
private Boolean allowNoBatch;
@TableField(value = "allowNoExpire")
private Boolean allowNoExpire;
@TableField(value = "allowNoProduct")
private Boolean allowNoProduct;
@TableField(value = "allowNoSerial")
private Boolean allowNoSerial;
@TableField(value = "spmc")
private String spmc;
@TableField(value = "cplx")
private String cplx;
@TableField(value = "hchzsb")
private String hchzsb;
@TableField(value = "cpdls")
private String cpdls;
@TableField(value = "basicPrductRemak1")
private String basicPrductRemak1;
@TableField(value = "basicPrductRemak2")
private String basicPrductRemak2;
@TableField(value = "basicPrductRemak3")
private String basicPrductRemak3;
@TableField(value = "basicPrductRemak4")
private String basicPrductRemak4;
@TableField(value = "basicPrductRemak5")
private String basicPrductRemak5;
@TableField(value = "basicPrductRemak6")
private String basicPrductRemak6;
@TableField(value = "basicPrductRemak7")
private String basicPrductRemak7;
@TableField(value = "basicPrductRemak8")
private String basicPrductRemak8;
@TableField(value = "price")
private String price;
private String sfwblztlcp;
private String cgzmraqxgxx;
private String sfbjwycxsy;
private String zdcfsycs;
private String sfwwjbz;
private String syqsfxyjxmj;
private String mjfs;
private String categoryName;
@TableField(exist = false)
//本地生成信息
private String batchNo;
@TableField(exist = false)
private String produceDate;
@TableField(exist = false)
private String expireDate;
@TableField(exist = false)
private String serialNo;
@TableField(exist = false)
private String udi;
@TableField(exist = false)
private String code;
@TableField(exist = false)
private Integer count;
@TableField(exist = false)
private String warehouseCode;
@TableField(exist = false)
private String deptCode;
@TableField(exist = false)
private String udplatCode;
@TableField(exist = false)
private String relId;//关联ID主键
@TableField(exist = false)
private Integer status;
@TableField(exist = false)
private String supId;
@TableField(exist = false)
private Boolean useMuti; //是否多次使用
private Date updateTime;
private Long relSupId;
@TableField(value = "pinyinInitial")
private String pinyinInitial;
@TableField(value = "zdcfsycs")
private String zdcfsycs;
private Boolean groupBuy;
@TableField(value = "sfwblztlcp")
private String sfwblztlcp;
@TableField(value = "cgzmraqxgxx")
private String cgzmraqxgxx;
@TableField(value = "sfbjwycxsy")
private String sfbjwycxsy;
@TableField(value = "sfwwjbz")
private String sfwwjbz;
@TableField(value = "syqsfxyjxmj")
private String syqsfxyjxmj;
@TableField(value = "mjfs")
private String mjfs;
@TableField(value = "categoryName")
private String categoryName;
@TableField(value = "updateTime")
private Date updateTime;
@TableField(value = "useNum")
private Integer useNum;
@TableField(value = "updateUser")
private String updateUser;
@TableField(value = "createTime")
private Date createTime;
@TableField(value = "createUser")
private String createUser;
@TableField(value = "destinyType")
private Integer destinyType;
private Long uid;
private Integer purType;
private Integer attributeType;
/**
* 12.
*
*/
private Integer hcType;
@TableField(value = "bzgg")
private String bzgg;
/**
* (
@ -135,37 +348,92 @@ public class UdiProductEntity {
@TableField(value = "matrial")
@ApiModelProperty(value = "耗材材质")
private String matrial;
@TableField(exist = false)
private Integer purType;
@TableField(exist = false)
private Integer hcType;
@TableField(value = "requireScanCode")
private Integer requireScanCode;
private String remark;
private String catalogcode;
/**
* (
* 1: 2:
*/
@TableField(value = "catalogCode1")
@ApiModelProperty(value = "一级分类名称(学科,品名)")
private Integer catalogCode1;
@TableField(value = "productsType")
private Integer productsType;
/**
* (
*
*/
@TableField(value = "catalogCode2")
@ApiModelProperty(value = "二级分类名称(用途、品目)")
private Integer catalogCode2;
@TableField(value = "levelUnit")
private String levelUnit;
/**
* (
*
*/
@TableField(value = "catalogCode3")
@ApiModelProperty(value = "三级分类名称(部位、功能、品种)")
private Integer catalogCode3;
@TableField(value = "prepnUnit")
private String prepnUnit;
private Integer requireScanCode;
/**
*
* 使
*/
private String bzgg;
@TableField(value = "useAttribute")
private String useAttribute;
private Boolean isStack;
/**
*
*/
@TableField(value = "transportCondition")
private String transportCondition;
/**
*
*/
@TableField(value = "storageCondition")
private String storageCondition;
/**
*
*/
@TableField(value = "specialCode")
private String specialCode;
/**
* 使
*/
@TableField(value = "indate")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
private Date indate;
/**
* () 1239
*/
@TableField(value = "physicType")
private Integer physicType;
/**
*
*/
@TableField(value = "prepnSpec")
private String prepnSpec;
/**
*
*/
@TableField(value = "majorType")
private Integer majorType;
/**
* 1:;2:;3:
*/
@TableField(value = "medicareType")
private Integer medicareType;
@TableField(value = "majorStatus")
private Integer majorStatus;
}

@ -200,4 +200,49 @@ public class UdiRelevanceEntity {
@TableField(value = "isStack")
private Boolean isStack;
/**
*
*/
@TableField(value = "distributeLevelDi")
private String distributeLevelDi;
/**
*
*/
@TableField(value = "distributeLevelUnit")
private String distributeLevelUnit;
/**
*
*/
@TableField(value = "distributeLevelCount")
private Integer distributeLevelCount;
/**
* 使
*/
@TableField(value = "useLevelDi")
private String useLevelDi;
/**
* 使
*/
@TableField(value = "useLevelUnit")
private String useLevelUnit;
/**
* 使
*/
@TableField(value = "useLeverCount")
private Integer useLeverCount;
/**
*
*/
@TableField(value = "payFeeCode")
private String payFeeCode;
@TableField(value = "productsType")
private Integer productsType;
}

@ -271,4 +271,11 @@ public class IoOrderEntity {
private String outSickInfo;
/**
* (1.2.)
*/
@TableField(value = "productType")
private Integer productType;
}

@ -112,6 +112,15 @@ public class PurReceiveEntity {
private String targetDeptCode;
/**
* (1.2.)
*/
@TableField(value = "productType")
private Integer productType;
public static final String COL_ID = "id";
public static final String COL_BILLNO = "billNo";

@ -121,6 +121,13 @@ public class PurApplyEntity {
@TableField(value = "generatePlan")
private boolean generatePlan;
/**
* (1.2.)
*/
@TableField(value = "productType")
private Integer productType;
public static final String COL_ID = "id";
public static final String COL_BILLNO = "billNo";
@ -158,4 +165,4 @@ public class PurApplyEntity {
public static final String COL_PLANBILLNO = "planBillNo";
public static final String COL_GENERATEPLAN = "generatePlan";
}
}

@ -147,6 +147,13 @@ public class PurOrderEntity {
private int dealStatus;
/**
* (1.2.)
*/
@TableField(value = "productType")
private Integer productType;
public static final String COL_ID = "id";
public static final String COL_BILLNO = "billNo";

@ -127,6 +127,13 @@ public class PurPlanEntity {
@TableField(value = "stockOrderNo")
private String stockOrderNo;
/**
* (1.2.)
*/
@TableField(value = "productType")
private Integer productType;
public static final String COL_ID = "id";
public static final String COL_BILLNO = "billNo";
@ -166,4 +173,4 @@ public class PurPlanEntity {
public static final String COL_APPLYBILLNO = "applyBillNo";
public static final String COL_STOCKORDERNO = "stockOrderNo";
}
}

@ -0,0 +1,265 @@
package com.glxp.api.req.basic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@NoArgsConstructor
@Data
public class AddProductRequest {
/**
*
*/
@JsonProperty("name")
@NotEmpty(message = "产品名称必填!")
private String name;
/**
*
*/
@JsonProperty("spec")
@NotEmpty(message = "规格型号必填!")
private String spec;
/**
*
*/
@JsonProperty("measname")
@NotEmpty(message = "计量单位必填!")
private String measname;
/**
*
*/
@JsonProperty("manufactory")
@NotEmpty(message = "生产企业必填!")
private String manufactory;
/**
*
*/
@JsonProperty("registerNo")
@NotEmpty(message = "注册证号必填!")
private String registerNo;
/**
*
*/
@JsonProperty("attributeType")
@NotNull(message = "产品属性必填!")
private Integer attributeType;
/**
* 12.
*/
@JsonProperty("hcType")
@NotNull(message = "耗材分类必填!")
private Integer hcType;
/**
*
*/
@JsonProperty("ylqxzcrbarmc")
private String ylqxzcrbarmc;
/**
*
*/
@JsonProperty("ylqxzcrbarywmc")
private String ylqxzcrbarywmc;
/**
*
*/
@JsonProperty("cplb")
private String cplb;
/**
*
*/
@JsonProperty("flbm")
private String flbm;
/**
*
*/
@JsonProperty("sptm")
private String sptm;
/**
*
*/
@JsonProperty("ybbm")
private String ybbm;
/**
*
*/
@JsonProperty("tyshxydm")
private String tyshxydm;
/**
*
*/
@JsonProperty("qxlb")
private String qxlb;
/**
*
*/
@JsonProperty("cpms")
private String cpms;
/**
* (
*/
@TableField(value = "catalogname1")
@ApiModelProperty(value = "一级分类名称(学科,品名)")
private String catalogname1;
/**
* (
*/
@TableField(value = "catalogname2")
@ApiModelProperty(value = "二级分类名称(用途、品目)")
private String catalogname2;
/**
* (
*/
@TableField(value = "catalogname3")
@ApiModelProperty(value = "三级分类名称(部位、功能、品种)")
private String catalogname3;
/**
*
*/
@TableField(value = "matrial")
@ApiModelProperty(value = "耗材材质")
private String matrial;
private BigDecimal price;
private Integer destinyType;
private String code;
private Integer requireScanCode;
//商品名称
private String spmc;
/**
* 1: 2:
*/
@TableField(value = "productsType")
private Integer productsType;
/**
*
*/
@TableField(value = "levelUnit")
private String levelUnit;
/**
*
*/
@TableField(value = "prepnUnit")
private String prepnUnit;
/**
*
*/
@TableField(value = "packMatrial")
private String packMatrial;
/**
* 使
*/
@TableField(value = "useAttribute")
private String useAttribute;
/**
*
*/
@TableField(value = "transportCondition")
private String transportCondition;
/**
*
*/
@TableField(value = "storageCondition")
private String storageCondition;
/**
*
*/
@TableField(value = "specialCode")
private String specialCode;
/**
*
*/
@TableField(value = "indate")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date indate;
/**
* () 1239
*/
@TableField(value = "physicType")
private Integer physicType;
/**
*
*/
@TableField(value = "prepnSpec")
private String prepnSpec;
/**
*
*/
@TableField(value = "majorType")
private Integer majorType;
/**
* 1:;2:;3:
*/
@TableField(value = "medicareType")
private Integer medicareType;
private Integer majorStatus;
/**
*
*/
private String zczbhhzbapzbh;
/**
*
*/
private String bzgg;
private String packRatio;
private String uuid;
private String nameCode;
private String cpmctymc;
private List<UpdateLevelDrugRequest> drugLevelLists;
/**
*
*/
private Long relId;
private Long id;
}

@ -95,4 +95,6 @@ public class CompanyProductRelevanceRequest extends ListPageRequest {
* 0:1:2:
*/
private Integer codeCheck;
private Integer productType = 1;
}

@ -92,4 +92,6 @@ public class FilterUdiRelRequest extends ListPageRequest {
private String mjfs;
private String categoryName;
private String deviceRecordKey;
private Integer productsType;
}

@ -0,0 +1,35 @@
package com.glxp.api.req.basic;
import lombok.Data;
@Data
public class UpdateLevelDrugRequest {
private Long id;
/**
*
*/
private String nameCode;
/**
*
*/
private Integer packLevel;
/**
*
*/
private String packUnit;
/**
*
*/
private String sjcpbm;
/**
*
*/
private String bhxjcpbm;
/**
*
*/
private Integer bhxjsl;
private Long relId;
private String uuid;
}

@ -30,4 +30,6 @@ public class AddOrderRequest {
private String checkPreInOrders;
private int fromVailPi; //是否需要校验三期1不需要2需要
private Integer productType = 1;//默认器械
}

@ -67,4 +67,10 @@ public class FilterCodeRequest extends ListPageRequest {
*
*/
List<String> actions;
/**
*
*/
private Integer productType = 1;//默认是器械
}

@ -30,4 +30,7 @@ public class FilterOrderDetailBizRequest extends ListPageRequest {
private String productName;
private Long bizIdFk;
private Integer productType = 1;
}

@ -42,4 +42,6 @@ public class FilterOrderDetailCodeRequest extends ListPageRequest {
private Long bizIdFk;
private Integer productType = 1;//默认器械
}

@ -202,4 +202,7 @@ public class FilterOrderRequest extends ListPageRequest {
*/
private Integer invoiceRegStatus;
private Integer productType = 1;
}

@ -86,6 +86,11 @@ public class IoOrderInvoiceRequest extends ListPageRequest {
//供应商ID
private String supId;
/**
* 1 2
*/
private Integer productType = 1;
public static final String COL_ID = "id";
public static final String COL_ORDERIDFK = "orderIdFk";

@ -107,4 +107,9 @@ public class FilterInvProductRequest extends ListPageRequest {
private Integer filterNoInv;
private Integer highValue;
/**
* 1 2
*/
private Integer productsType = 1;
}

@ -39,5 +39,7 @@ public class PurOrderDetailRequest extends ListPageRequest {
*/
private String supId;
private Integer productType = 1;//默认器械
}

@ -100,5 +100,6 @@ public class PurOrderRequest extends ListPageRequest {
private String endAuditDate;
private Integer dealStatus;
private String orderBy;
private Integer productType = 1;
}

@ -178,10 +178,14 @@ public class UdiRelevanceResponse {
private Integer requireScanCode;
/**
*
*
*/
private String bzgg;
private String prepnSpec;
private String prepnUnit;
public int getBhzxxsbzsl() {
if (bhzxxsbzsl == null || bhzxxsbzsl == 0) {

@ -141,4 +141,11 @@ public class UdiRlSupResponse {
private Integer hcType;
private Boolean isStack;
private Integer requireScanCode;
/**
*
*/
private String bzgg;
private String prepnSpec;
private String prepnUnit;
}

@ -148,4 +148,14 @@ public class IoCodeResponse {
private String ylqxzcrbarmc;
private String zczbhhzbapzbh;
private String manufactory;
/**
*
*/
private String bzgg;
private String packUnit;
private String prepnSpec;
private String prepnUnit;
}

@ -181,5 +181,13 @@ public class IoOrderDetailBizResponse {
private String checkColdFileName;
/**
*
*/
private String bzgg;
private String packUnit;
private String prepnSpec;
private String prepnUnit;
}

@ -1,5 +1,7 @@
package com.glxp.api.res.inout;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.math.BigDecimal;
@ -188,6 +190,31 @@ public class IoOrderDetailResultResponse {
private Boolean isStack;
private String invoiceEncode;
@ExcelProperty(value = "发票确认时间", index = 12)
private Date confirmTime;
@ExcelProperty(value = "配送商", index = 7)
private String corpName;
private String fromInvName;
@ExcelProperty(value = "往来单位", index = 0)
private String fromName;
/**
*
*/
private String bzgg;
private String prepnSpec;;
public String getFromName() {
if (StrUtil.isNotEmpty(fromCorpName))
return fromCorpName;
if (StrUtil.isNotEmpty(fromInvName))
return fromInvName;
return fromName;
}
}

@ -100,6 +100,15 @@ public class IoOrderInvoiceResponse {
private BigDecimal amout;
/**
*
*/
private String bzgg;
private String packUnit;
private String prepnSpec;
private String prepnUnit;
public static final String COL_ID = "id";
public static final String COL_ORDERIDFK = "orderIdFk";

@ -119,4 +119,11 @@ public class InvProductResponse {
private BigDecimal price;
/**
*
*/
private String packUnit;
private String prepnUnit;
private String prepnSpec;
}

@ -51,4 +51,14 @@ public class PurOrderDetailResponse {
private String billNo;
private String nameCode;
/**
*
*/
private String bzgg;
private String packUnit;
private String prepnSpec;
private String prepnUnit;
}

@ -1,10 +1,11 @@
package com.glxp.api.service.basic;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.req.basic.AddProductRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.UdiInfoRequest;
import com.glxp.api.req.basic.UpdateLevelDrugRequest;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -65,4 +66,8 @@ public interface UdiProductService {
* @return
*/
UdiProductEntity getAllowNoBatch(String nameCode);
AddProductRequest addDrug(AddProductRequest addProductRequest);
void saveOrUpadateLevelDrug(UpdateLevelDrugRequest updateLevelDrugRequest);
}

@ -4,13 +4,22 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.basic.UdiProductDao;
import com.glxp.api.dao.basic.UdiRelevanceDao;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.entity.basic.UdiRelevanceEntity;
import com.glxp.api.exception.JsonException;
import com.glxp.api.req.basic.AddProductRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.UdiInfoRequest;
import com.glxp.api.req.basic.UpdateLevelDrugRequest;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.UdiProductService;
import com.glxp.api.util.IntUtil;
import com.glxp.api.util.udi.FilterUdiUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -18,6 +27,7 @@ import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Optional;
@Service
@Transactional(rollbackFor = Exception.class)
@ -26,6 +36,12 @@ public class UdiProductServiceImpl implements UdiProductService {
@Resource
UdiProductDao udiProductDao;
@Resource
UdiRelevanceDao udiRelevanceDao;
@Resource
private CustomerService customerService;
@Override
public List<UdiProductEntity> filterUdiInfo(FilterUdiRelRequest filterUdiRelRequest) {
if (filterUdiRelRequest == null) {
@ -207,4 +223,195 @@ public class UdiProductServiceImpl implements UdiProductService {
String di = FilterUdiUtils.getDiStr(nameCode);
return udiProductDao.selectAllowNoBatch(di);
}
@Override
/**
* /
*
* @param addProductRequest
* @return
*/
public AddProductRequest addDrug(AddProductRequest addProductRequest) {
UdiRelevanceEntity udiRelevanceEntity;
//编辑保存
if (addProductRequest.getRelId() != null) {
udiRelevanceEntity = udiRelevanceDao.selectById(addProductRequest.getRelId());
List<UdiProductEntity> udiProductEntities = udiProductDao.findByUuids(udiRelevanceEntity.getUuid());
for (UdiProductEntity udiProductEntity : udiProductEntities) {
addProductRequest.setNameCode(udiProductEntity.getNameCode());
BeanUtils.copyProperties(addProductRequest, udiProductEntity);
udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc());
udiProductEntity.setProductsType(2);
udiProductEntity.setGgxh(addProductRequest.getSpec());
udiProductEntity.setPrice(addProductRequest.getPrice() == null ? "0" : addProductRequest.getPrice().toString());
udiProductEntity.setZczbhhzbapzbh(addProductRequest.getRegisterNo());
if (IntUtil.value(udiProductEntity.getPackLevel()) == 1) {
udiProductEntity.setDiType(1);
}
udiProductDao.updateById(udiProductEntity);
}
} else {
udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setId(IdUtil.getSnowflakeNextId());
udiRelevanceEntity.setIsDisable(false);
udiRelevanceEntity.setIsUseDy(false);
udiRelevanceEntity.setUuid(IdUtil.getSnowflakeNextId() + "");
udiRelevanceEntity.setNeedCert(false);
udiRelevanceEntity.setPurType(1);
udiRelevanceEntity.setProductsType(2);
udiRelevanceEntity.setAttributeType(addProductRequest.getAttributeType());
udiRelevanceEntity.setHcType(addProductRequest.getHcType());
if (CollUtil.isNotEmpty(addProductRequest.getDrugLevelLists())) {
for (UpdateLevelDrugRequest updateLevelDrugRequest : addProductRequest.getDrugLevelLists()) {
UdiProductEntity udiProductEntity1 = udiProductDao.findByNameCode(updateLevelDrugRequest.getNameCode());
if (udiProductEntity1 != null) {
throw new JsonException(500, "层级编码已存在!");
}
UdiProductEntity udiProductEntity = new UdiProductEntity();
BeanUtils.copyProperties(updateLevelDrugRequest, udiProductEntity);
BeanUtils.copyProperties(addProductRequest,udiProductEntity);
udiProductEntity.setNameCode(updateLevelDrugRequest.getNameCode());
udiProductEntity.setCpmctymc(addProductRequest.getCpmctymc());
udiProductEntity.setUuid(udiRelevanceEntity.getUuid());
udiProductEntity.setProductsType(2);
udiProductEntity.setGgxh(addProductRequest.getSpec());
udiProductEntity.setPrice(addProductRequest.getPrice() == null ? "0" : addProductRequest.getPrice().toString());
udiProductEntity.setZczbhhzbapzbh(addProductRequest.getRegisterNo());
udiProductEntity.setPackLevel(updateLevelDrugRequest.getPackLevel() + "");
udiProductEntity.setUuid(udiProductEntity.getUuid());
if (IntUtil.value(udiProductEntity.getPackLevel()) == 1 || addProductRequest.getDrugLevelLists().size() == 1) {
udiProductEntity.setDiType(1);
if (IntUtil.value(udiProductEntity.getPackLevel()) == 1) {
calculateDistCount(udiProductEntity, udiRelevanceEntity);
calculateUseCount(udiProductEntity, udiRelevanceEntity);
}
}
setUpdateInfo(udiProductEntity, udiRelevanceEntity);
udiProductEntity.setId(IdUtil.getSnowflakeNextId());
udiProductDao.insert(udiProductEntity);
}
}
udiRelevanceDao.insertUdiRelevance(udiRelevanceEntity);
}
return addProductRequest;
}
@Override
public void saveOrUpadateLevelDrug(UpdateLevelDrugRequest updateLevelDrugRequest) {
//编辑保存
if (updateLevelDrugRequest.getRelId() != null) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceDao.selectById(updateLevelDrugRequest.getRelId());
UdiProductEntity udiProductEntity1 = udiProductDao.findByNameCode(updateLevelDrugRequest.getNameCode());
if (udiProductEntity1 != null) {
//更新
udiProductEntity1.setNameCode(updateLevelDrugRequest.getNameCode());
udiProductEntity1.setPackLevel(updateLevelDrugRequest.getPackLevel() + "");
udiProductEntity1.setPackUnit(updateLevelDrugRequest.getPackUnit());
udiProductEntity1.setSjcpbm(updateLevelDrugRequest.getSjcpbm());
udiProductEntity1.setBhxjcpbm(updateLevelDrugRequest.getBhxjcpbm());
udiProductEntity1.setBhxjsl(updateLevelDrugRequest.getBhxjsl());
udiProductDao.updateById(udiProductEntity1);
} else {
//新增
udiProductEntity1 = udiProductDao.findByUuid(udiRelevanceEntity.getUuid());
udiProductEntity1.setNameCode(updateLevelDrugRequest.getNameCode());
udiProductEntity1.setPackLevel(updateLevelDrugRequest.getPackLevel() + "");
udiProductEntity1.setPackUnit(updateLevelDrugRequest.getPackUnit());
udiProductEntity1.setSjcpbm(updateLevelDrugRequest.getSjcpbm());
udiProductEntity1.setBhxjcpbm(updateLevelDrugRequest.getBhxjcpbm());
udiProductEntity1.setBhxjsl(updateLevelDrugRequest.getBhxjsl());
udiProductEntity1.setUuid(udiRelevanceEntity.getUuid());
udiProductEntity1.setId(IdUtil.getSnowflakeNextId());
udiProductDao.insert(udiProductEntity1);
}
} else {
//必须先提交后才能保存
UdiProductEntity udiProductEntity1 = udiProductDao.findByNameCode(updateLevelDrugRequest.getNameCode());
if (udiProductEntity1 != null) {
throw new JsonException(500, "层级编码已存在!");
}
}
}
/**
*
*/
public void calculateDistCount(UdiProductEntity udiProductEntity, UdiRelevanceEntity udiRelevanceEntity) {
List<UdiProductEntity> udiProductEntities = udiProductDao.findByOriginUuid(udiProductEntity.getUuid());
CountWrapper xjCountWrapper = new CountWrapper();
findUltimateEntity(udiProductEntity, udiProductEntities, xjCountWrapper);
udiRelevanceEntity.setDistributeLevelDi(udiProductEntity.getNameCode());
udiRelevanceEntity.setDistributeLevelUnit(udiProductEntity.getPackUnit());
udiRelevanceEntity.setDistributeLevelCount(xjCountWrapper.getCount());
}
/**
* 使
*/
public void calculateUseCount(UdiProductEntity udiProductEntity, UdiRelevanceEntity udiRelevanceEntity) {
List<UdiProductEntity> udiProductEntities = udiProductDao.findByOriginUuid(udiProductEntity.getUuid());
CountWrapper xjCountWrapper = new CountWrapper();
findUltimateEntity(udiProductEntity, udiProductEntities, xjCountWrapper);
udiRelevanceEntity.setUseLevelDi(udiProductEntity.getNameCode());
udiRelevanceEntity.setUseLevelUnit(udiProductEntity.getPackUnit());
udiRelevanceEntity.setUseLeverCount(xjCountWrapper.getCount());
}
public static UdiProductEntity findUltimateEntity(UdiProductEntity udiProductEntity, List<UdiProductEntity> udiProductEntities, CountWrapper xjCountWrapper) {
if (StrUtil.isEmpty(udiProductEntity.getBhxjcpbm())) {
xjCountWrapper.addCount(udiProductEntity.getBhxjsl());
return udiProductEntity;
}
Optional<UdiProductEntity> nextEntityOptional = udiProductEntities.stream()
.filter(item -> item.getNameCode().equals(udiProductEntity.getBhxjcpbm()))
.findFirst();
nextEntityOptional.ifPresent(entity -> xjCountWrapper.addCount(udiProductEntity.getBhxjsl()));
return nextEntityOptional
.map(entity -> findUltimateEntity(entity, udiProductEntities, xjCountWrapper))
.orElse(null);
}
/**
*
*/
private void setUpdateInfo(UdiProductEntity udiProductEntity, UdiRelevanceEntity udiRelevanceEntity) {
Date now = new Date();
String userId = String.valueOf(customerService.getUserBean().getId());
udiProductEntity.setUpdateTime(now);
udiProductEntity.setUpdateUser(userId);
udiRelevanceEntity.setModifyTime(now);
udiRelevanceEntity.setUpdateTime(now);
udiRelevanceEntity.setUpdateUser(userId);
}
public static class CountWrapper {
private int count;
public CountWrapper() {
this.count = 1;
}
public int getCount() {
return count;
}
public void addCount(int value) {
if (value == 0)
value = 1;
this.count = this.count * value;
}
}
}

@ -38,6 +38,7 @@ public interface IoOrderDetailBizService {
IoOrderDetailBizEntity findByRelId(String orderId, Long relId);
List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderDetailBizResponse> filterDrugList(FilterOrderDetailBizRequest orderDetailBizRequest);
List<IoOrderDetailCodeResponse> getfilterList(FilterOrderDetailCodeRequest orderDetailBizRequest);

@ -29,6 +29,7 @@ public interface IoOrderDetailCodeService {
* @return
*/
List<IoOrderDetailCodeResponse> filterList(FilterOrderDetailCodeRequest detailCodeRequest);
List<IoOrderDetailCodeResponse> filterDrugList(FilterOrderDetailCodeRequest detailCodeRequest);
/**
*

@ -121,6 +121,17 @@ public class IoCodeService extends ServiceImpl<IoCodeDao, IoCodeEntity> {
}
public List<IoCodeResponse> filterDrugList(FilterCodeRequest filterCodeRequest) {
if (null == filterCodeRequest) {
return Collections.emptyList();
}
if (null != filterCodeRequest.getPage() && null != filterCodeRequest.getLimit()) {
PageHelper.offsetPage((filterCodeRequest.getPage() - 1) * filterCodeRequest.getLimit(), filterCodeRequest.getLimit());
}
return ioCodeDao.filterDrugList(filterCodeRequest);
}
public BaseResponse deleteCodeByOrderId(String orderId) {
if (StrUtil.isBlank(orderId)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "单据号不能为空");

@ -129,6 +129,18 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
return ioOrderDetailBizDao.filterList(orderDetailBizRequest);
}
@Override
public List<IoOrderDetailBizResponse> filterDrugList(FilterOrderDetailBizRequest orderDetailBizRequest) {
if (null == orderDetailBizRequest) {
return Collections.emptyList();
}
if (null != orderDetailBizRequest.getPage() && null != orderDetailBizRequest.getLimit()) {
PageHelper.offsetPage((orderDetailBizRequest.getPage() - 1) * orderDetailBizRequest.getLimit(), orderDetailBizRequest.getLimit());
}
return ioOrderDetailBizDao.filterDrugList(orderDetailBizRequest);
}
@Override
public List<IoOrderDetailCodeResponse> getfilterList(FilterOrderDetailCodeRequest OrderDetailCodeRequest) {
if (null == OrderDetailCodeRequest) {

@ -85,6 +85,17 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
return ioOrderDetailCodeDao.filterList(detailCodeRequest);
}
@Override
public List<IoOrderDetailCodeResponse> filterDrugList(FilterOrderDetailCodeRequest detailCodeRequest) {
if (null == detailCodeRequest) {
return Collections.emptyList();
}
if (null != detailCodeRequest.getPage() && null != detailCodeRequest.getLimit()) {
PageHelper.offsetPage((detailCodeRequest.getPage() - 1) * detailCodeRequest.getLimit(), detailCodeRequest.getLimit());
}
return ioOrderDetailCodeDao.filterDrugList(detailCodeRequest);
}
@Override
public int deleteByOrderId(String orderId) {
return ioOrderDetailCodeDao.delete(new QueryWrapper<IoOrderDetailCodeEntity>().eq("orderIdFk", orderId));

@ -12,6 +12,7 @@ import java.util.List;
public interface PurOrderDetailService {
List<PurOrderDetailResponse> joinQueryList(PurOrderDetailRequest purOrderDetailRequest);
List<PurOrderDetailResponse> joinQueryDrugList(PurOrderDetailRequest purOrderDetailRequest);
List<PurOrderDetailEntity> findByOrderId(String orderId);

@ -36,6 +36,19 @@ public class PurOrderDetailServiceImpl implements PurOrderDetailService {
return data;
}
@Override
public List<PurOrderDetailResponse> joinQueryDrugList(PurOrderDetailRequest purOrderDetailRequest) {
if (purOrderDetailRequest == null) {
return Collections.emptyList();
}
if (purOrderDetailRequest.getPage() != null) {
int offset = (purOrderDetailRequest.getPage() - 1) * purOrderDetailRequest.getLimit();
PageHelper.offsetPage(offset, purOrderDetailRequest.getLimit());
}
List<PurOrderDetailResponse> data = purOrderDetailDao.joinQueryDrugList(purOrderDetailRequest);
return data;
}
@Override
public List<PurOrderDetailEntity> findByOrderId(String orderId) {
PurOrderDetailRequest purOrderDetailRequest = new PurOrderDetailRequest();

@ -66,7 +66,8 @@
basic_products.syqsfxyjxmj,
basic_products.mjfs,
basic_products.categoryName,
basic_products.cphhhbh
basic_products.cphhhbh,
basic_products.bzgg
FROM basic_udirel
inner JOIN basic_products
ON basic_products.uuid = basic_udirel.uuid
@ -472,7 +473,9 @@
basic_products.catalogname3,
basic_products.matrial,
basic_products.requireScanCode,
basic_products.bzgg
basic_products.bzgg,
basic_products.prepnSpec,
basic_products.prepnUnit
FROM basic_products
inner JOIN basic_udirel
@ -485,6 +488,9 @@
<if test="mainIdLike != '' and mainIdLike != null">
AND mainId LIKE concat('%', #{mainIdLike}, '%')
</if>
<if test="productsType != '' and productsType != null">
AND basic_products.productsType = #{productsType}
</if>
<if test="relCode != '' and relCode != null">
AND relCode = #{relCode}
</if>

@ -123,7 +123,11 @@
basic_products.catalogname1,
basic_products.catalogname2,
basic_products.catalogname3,
basic_products.matrial
basic_products.matrial,
basic_products.bzgg,
basic_products.packUnit,
basic_products.prepnSpec,
basic_products.prepnUnit
FROM company_product_relevance
inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id
@ -150,6 +154,9 @@
<if test="purType != '' and purType != null">
AND basic_udirel.purType = #{purType}
</if>
<if test="productType != '' and productType != null">
AND basic_products.productsType = #{productType}
</if>
<if test="codeCheck != null">
AND basic_products.requireScanCode = #{codeCheck}
</if>

@ -68,6 +68,76 @@
<if test="code != null and code != ''">
AND ic.code = #{code}
</if>
<if test="productType != null and productType != ''">
AND bp.productsType = #{productType}
</if>
<if test="orderId != null and orderId != ''">
AND ic.orderId like concat('%', #{orderId}, '%')
</if>
<if test="nameCode != null and nameCode != ''">
AND ic.nameCode like concat('%', #{nameCode}, '%')
</if>
<if test="supId != null and supId != ''">
AND ic.supId like concat('%', #{supId}, '%')
</if>
<if test="relId != null and relId != ''">
AND ic.relId like concat('%', #{relId}, '%')
</if>
<if test="deptCode != null and deptCode != ''">
AND ic.deptCode = #{deptCode}
</if>
<if test="invCode != null and invCode != ''">
AND ic.invCode = #{invCode}
</if>
<if test="warehouseCode != null and warehouseCode != ''">
AND ic.warehouseCode = #{warehouseCode}
</if>
<if test="packageLevel != null and packageLevel != ''">
AND ic.packageLevel = #{packageLevel}
</if>
<if test="batchNo != null and batchNo != ''">
AND ic.batchNo = #{batchNo}
</if>
<if test="corpOrderId != null and corpOrderId != ''">
AND ic.corpOrderId = #{corpOrderId}
</if>
<if test="actions != null and actions.size() != 0">
AND ic.action in
<foreach collection="actions" item="item" open="(" close=")" index="index" separator=",">
#{item}
</foreach>
</if>
</where>
group by ic.id
</select>
<select id="filterDrugList" resultType="com.glxp.api.res.inout.IoCodeResponse">
select ic.*,
bp.cpmctymc productName,
bp.ggxh,bp.ylqxzcrbarmc,bp.zczbhhzbapzbh,bp.manufactory,
ad.name deptName,
aw.name invName,
auth_space.name warehouseName,
bp.bzgg,
bp.packUnit,
bp.prepnSpec,
bp.prepnUnit,
bc.name supName
from io_code ic
left join auth_dept ad on ic.deptCode = ad.code
left join auth_warehouse aw on ic.invCode = aw.code
left join auth_space on auth_space.code = ic.warehouseCode
left join basic_udirel bu on bu.id = ic.relId
left join basic_products bp on bu.uuid = bp.uuid
left join basic_corp bc on bc.erpId = ic.supId
<where>
<if test="code != null and code != ''">
AND ic.code = #{code}
</if>
<if test="productType != null and productType != ''">
AND bp.productsType = #{productType}
</if>
<if test="orderId != null and orderId != ''">
AND ic.orderId like concat('%', #{orderId}, '%')
</if>

@ -19,6 +19,9 @@
<if test="id != null and id != ''">
AND id = #{id}
</if>
<if test="productType != null and productType != ''">
AND productType = #{productType}
</if>
<if test="corpName != null and corpName != ''">
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
concat('%', #{corpName}, '%')
@ -444,6 +447,9 @@
<if test="id != null and id != ''">
AND io.id = #{id}
</if>
<if test="productType != null and productType != ''">
AND io.productType = #{productType}
</if>
<if test="corpName != null and corpName != ''">
AND (SELECT NAME FROM auth_warehouse aw2 WHERE aw2.CODE = io.fromInvCode) like
concat('%', #{corpName}, '%')

@ -3,6 +3,34 @@
<mapper namespace="com.glxp.api.dao.inout.IoOrderDetailBizDao">
<select id="filterList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse">
select io_order_detail_biz.*
from io_order_detail_biz
left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk
left join basic_products bp on bu.uuid = bp.uuid
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
<if test="productType != null">
AND bp.productsType = #{productType}
</if>
<if test="relId != null">
AND bindRlFk = #{relId}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}
</if>
<if test="productName != null and productName != ''">
AND bp.cpmctymc like concat('%', #{productName}, '%')
</if>
</where>
group by io_order_detail_biz.id
</select>
<select id="filterDrugList" resultType="com.glxp.api.res.inout.IoOrderDetailBizResponse">
select io_order_detail_biz.*,
bp.packUnit,
bp.prepnSpec,
bp.prepnUnit
from io_order_detail_biz
left join basic_udirel bu on bu.id = io_order_detail_biz.bindRlFk
left join basic_products bp on bu.uuid = bp.uuid
@ -13,6 +41,9 @@
<if test="relId != null">
AND bindRlFk = #{relId}
</if>
<if test="productType != null">
AND bp.productsType = #{productType}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}
</if>
@ -50,7 +81,11 @@
<select id="filterListInv" resultType="com.glxp.api.res.inout.IoOrderInvoiceResponse">
SELECT ic.*, cpmctymc, ggxh
SELECT ic.*, cpmctymc, ggxh,
bp.bzgg,
bp.packUnit,
bp.prepnSpec,
bp.prepnUnit
FROM io_order_invoice ic
LEFT JOIN basic_udirel bu ON bu.id = ic.bindRlFk
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid

@ -8,6 +8,49 @@
left join basic_udirel bu on bu.id = io_order_detail_code.bindRlFk
left join basic_products bp on bp.uuid = bu.uuid
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
<if test="productType != null">
AND bp.productsType = #{productType}
</if>
<if test="relIdFk != null and relIdFk != ''">
AND bindRlFk = #{relIdFk}
</if>
<if test="nameCode != null and nameCode != ''">
AND nameCode = #{nameCode}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo = #{batchNo}
</if>
<if test="uuidFk != null and uuidFk != ''">
AND uuidFk = #{uuidFk}
</if>
<if test="productName != null and productName != ''">
AND bp.cpmctymc like concat('%', #{productName}, '%')
</if>
</where>
group by io_order_detail_code.id
</select>
<select id="filterDrugList" resultType="com.glxp.api.res.inout.IoOrderDetailCodeResponse">
select io_order_detail_code.*,
bp.bzgg,
bp.packUnit,
bp.prepnSpec,
bp.prepnUnit,
(select `name` from basic_corp where erpId = io_order_detail_code.supId) supName
from io_order_detail_code
left join basic_udirel bu on bu.id = io_order_detail_code.bindRlFk
left join basic_products bp on bp.uuid = bu.uuid
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>
<if test="productType != null">
AND bp.productsType = #{productType}
</if>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
</if>

@ -28,6 +28,8 @@
a2.*,
a1.mainAction,
bu.isStack,
bp.bzgg,
bp.prepnSpec,
GROUP_CONCAT( ioi.invoiceEncode ORDER BY ioi.invoiceEncode SEPARATOR ',' ) AS invoiceCodes,
b1.NAME AS fromCorpName
,basic_bussiness_type.name billTypeName
@ -36,6 +38,7 @@
LEFT JOIN io_order a1 ON a1.billNo = a2.orderIdFk
LEFT JOIN basic_corp b1 ON b1.erpId = a1.fromCorp
LEFT JOIN basic_udirel bu ON a2.bindRlFk = bu.id
LEFT JOIN basic_products bp ON bp.uuid = bu.uuid
left join basic_bussiness_type on a1.action = basic_bussiness_type.action
LEFT JOIN io_order_invoice ioi ON a1.billNo = ioi.orderIdFk
<where>

@ -85,6 +85,9 @@
<if test="supId != null and supId != ''">
AND ioo.customerId = #{supId}
</if>
<if test="productType != null and productType != ''">
AND ioo.productType = #{productType}
</if>
</where>
GROUP BY ic.invoiceEncode
order by ic.updateTime desc

@ -17,6 +17,9 @@
bp.ylqxzcrbarmc,
bp.zczbhhzbapzbh,
bp.bzgg,
bp.packUnit,
bp.prepnUnit,
bp.prepnSpec,
sum(ip.inCount) as inCount,
sum(ip.outCount) as outCount,
sum(ip.reCount) as reCount,
@ -47,6 +50,9 @@
<if test="relIdFk != null and relIdFk != ''">
AND ip.relIdFk = #{relIdFk}
</if>
<if test="productsType != null and productsType != ''">
AND bp.productsType = #{productsType}
</if>
<if test="ggxh != null and ggxh != ''">
AND bp.ggxh like concat('%', #{ggxh}, '%')
</if>

@ -53,6 +53,9 @@
<if test="billNo != '' and billNo != null">
AND billNo = #{billNo}
</if>
<if test="productType != '' and productType != null">
AND pur_order.productType = #{productType}
</if>
<if test="startDate != null and startDate != ''">
<![CDATA[
and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') >= #{startDate}

@ -56,6 +56,44 @@
<if test="productId != null">
AND productId = #{productId}
</if>
<if test="productType != null">
AND basic_products.productsType = #{productType}
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>
</where>
</select>
<select id="joinQueryDrugList" parameterType="com.glxp.api.req.purchase.PurOrderDetailRequest"
resultType="com.glxp.api.res.purchase.PurOrderDetailResponse">
SELECT pur_order_detail.*,
basic_products.ggxh spec,
basic_products.nameCode nameCode,
basic_products.measname,
basic_products.manufactory,
basic_products.ylqxzcrbarmc,
basic_products.bzgg,
basic_products.packUnit,
basic_products.prepnSpec,
basic_products.prepnUnit,
basic_corp.`name` supName
FROM pur_order_detail
left JOIN basic_udirel ON pur_order_detail.productId = basic_udirel.id
left JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
left JOIN basic_corp ON pur_order_detail.supId = basic_corp.erpId
<where>
<if test="orderIdFk != '' and orderIdFk != null">
AND orderIdFk = #{orderIdFk}
AND basic_products.diType = 1
</if>
<if test="productId != null">
AND productId = #{productId}
</if>
<if test="productType != null">
AND basic_products.productsType = #{productType}
</if>
<if test="supId != '' and supId != null">
AND supId = #{supId}
</if>

@ -848,4 +848,107 @@ VALUES (2021, 8, '2', 1, 'mainIdLike', '内部物资编码', 'input', NULL, NULL
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'codeCheck',
'tinyint NULL DEFAULT NULL COMMENT '' 是否开启校验扫码 0:不校验1:只允许录入扫码产品2:只允许录入不扫码产品''', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'isStack', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_products', 'productsType',
' tinyint NULL DEFAULT b''1'' COMMENT ''产品类型 1:耗材 2:药品''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'levelUnit',
'varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''每个层级的单位(例如:箱,盒,支)''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'prepnUnit',
'varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''制剂单位''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'prepnSpec',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''制剂规格''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'specialCode',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''特殊分类码''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'storageCondition',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''存储条件''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'transportCondition',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''运输条件''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'useAttribute',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''使用属性''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'useAttribute',
'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''包装材质''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'majorType',
' tinyint NULL DEFAULT NULL COMMENT ''药品分类''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'majorStatus',
' tinyint NULL DEFAULT NULL COMMENT ''药品状态''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'physicType',
' tinyint NULL DEFAULT NULL COMMENT ''药品类型(详见码表) 1特殊药品原料药2特殊药品制剂3普通药品9未分类''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'medicareType',
' tinyint NULL DEFAULT NULL COMMENT ''医保分类 1:甲类;2:乙类;3:丙类''',
1);
CALL Pro_Temp_ColumnWork('basic_products', 'indate',
' datetime NULL DEFAULT NULL COMMENT ''有效日期''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'distributeLevelDi',
'varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''流通计量层层级标识''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'distributeLevelUnit',
'varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''流通计量层级单位''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'distributeLevelCount',
' int NULL DEFAULT NULL COMMENT ''流通时包含计量单元的数量''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'useLevelDi',
'varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''使用计量层级标识''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'useLevelUnit',
'varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''使用计量层级单位''',
1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'useLeverCount',
'int NULL DEFAULT NULL COMMENT ''使用是当前层级包含计量单元数量''',
1);
CALL Pro_Temp_ColumnWork('io_order', 'workPlaceCode', 'varchar(20)', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'payFeeCode',
'varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''收费项目编码''',
1);
CALL Pro_Temp_ColumnWork('pur_receive', 'productType',
' tinyint NULL DEFAULT NULL COMMENT ''产品类型(1.耗材2.药品)''',
1);
CALL Pro_Temp_ColumnWork('pur_apply', 'productType',
' tinyint NULL DEFAULT NULL COMMENT ''产品类型(1.耗材2.药品)''',
1);
CALL Pro_Temp_ColumnWork('pur_plan', 'productType',
' tinyint NULL DEFAULT NULL COMMENT ''产品类型(1.耗材2.药品)''',
1);
CALL Pro_Temp_ColumnWork('pur_order', 'productType',
' tinyint NULL DEFAULT NULL COMMENT ''产品类型(1.耗材2.药品)''',
1);
CALL Pro_Temp_ColumnWork('io_order', 'productType',
' tinyint NULL DEFAULT NULL COMMENT ''产品类型(1.耗材2.药品)''',
1);
CALL Pro_Temp_ColumnWork('thr_products_add_di', 'isStack', 'tinyint', 1);

Loading…
Cancel
Save