diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index e81ecf04..c3232b4e 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -440,6 +440,17 @@ public class IoCodeTempController extends BaseController { return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); } } + + //是否开启校验扫码 :0:不校验;1:只允许录入扫码产品;2:只允许录入不扫码产品 + if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 1)){ + if (IntUtil.value(udiInfoEntity.getRequireScanCode()) != 1) { + return ResultVOUtils.error(500, "单据只允许录入需要扫码产品" + ",请检查后重试!"); + } + }else if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 2)) { + if (IntUtil.value(udiInfoEntity.getHcType()) != 0) { + return ResultVOUtils.error(500, "单据只允许录入不需要扫码产品" + ",请检查后重试!"); + } + } } String orderId = addOrderRequest.getBillNo(); diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index df635eee..fc1c06dc 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -212,6 +212,17 @@ public class IoOrderDetailBizController extends BaseController { return ResultVOUtils.error(500, "单据只允许录入普通耗材" + ",请检查后重试!"); } } + + //是否开启校验扫码 :0:不校验;1:只允许录入扫码产品;2:只允许录入不扫码产品 + if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 1)){ + if (IntUtil.value(udiRelevanceResponse.getRequireScanCode()) != 1) { + return ResultVOUtils.error(500, "单据只允许录入需要扫码产品" + ",请检查后重试!"); + } + }else if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 2)) { + if (IntUtil.value(udiRelevanceResponse.getHcType()) != 0) { + return ResultVOUtils.error(500, "单据只允许录入不需要扫码产品" + ",请检查后重试!"); + } + } } if (IntUtil.value(bussinessTypeEntity.getCheckCertExpire()) == 2 && udiRelevanceResponse.isNeedCert()) { diff --git a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java index 3b84dd10..d9b7b178 100644 --- a/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java +++ b/src/main/java/com/glxp/api/controller/thrsys/ThrProductsAddDiController.java @@ -4,6 +4,7 @@ package com.glxp.api.controller.thrsys; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.github.pagehelper.PageInfo; @@ -33,6 +34,7 @@ import com.glxp.api.res.thrsys.UdiInfoResponse; import com.glxp.api.service.auth.AuthAdminService; import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.basic.*; +import com.glxp.api.service.system.SystemParamConfigService; import com.glxp.api.service.thrsys.ThrProductsService; import com.glxp.api.service.thrsys.ThrSystemService; import com.glxp.api.service.thrsys.impl.ThrProductsAddDiService; @@ -53,6 +55,7 @@ import java.io.File; import java.math.BigDecimal; import java.util.Date; import java.util.List; +import java.util.Set; /** * 供应商新增DI产品相关接口 @@ -85,6 +88,8 @@ public class ThrProductsAddDiController { CustomerService customerService; @Resource GennerOrderUtils gennerOrderUtils; + @Resource + SystemParamConfigService systemParamConfigService; /** * 查询DI产品信息列表 @@ -187,6 +192,90 @@ public class ThrProductsAddDiController { //审核通过 //第三方产品审核通过 if (thrProductsAddDiEntity.getType() == 2) { + //是否开启内部物资编码 + String internalMaterialCode = systemParamConfigService.selectValueByParamKey("internal_material_code"); + if (IntUtil.value(internalMaterialCode) > 0) { + Long udiRelIdFk = gennerOrderUtils.getRelId(); + //字段更新 + UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity(); + //更新产品信息 + UdiProductEntity udiProductEntity = new UdiProductEntity(); + BeanUtil.copyProperties(thrProductsAddDiEntity,udiProductEntity); + udiProductEntity.setUuid(thrProductsAddDiEntity.getUuid()); + udiProductEntity.setCpmctymc(thrProductsAddDiEntity.getName()); + udiProductEntity.setNameCode(thrProductsAddDiEntity.getCode()); + udiProductEntity.setSpmc(thrProductsAddDiEntity.getName()); + udiProductEntity.setGgxh(thrProductsAddDiEntity.getSpec()); + udiProductEntity.setSptm(thrProductsAddDiEntity.getSptm()); + udiProductEntity.setZczbhhzbapzbh(thrProductsAddDiEntity.getRegisterNo()); + udiProductEntity.setYlqxzcrbarmc(thrProductsAddDiEntity.getManufactory()); + udiProductEntity.setYbbm(thrProductsAddDiEntity.getYbbm()); + udiProductEntity.setMeasname(thrProductsAddDiEntity.getMeasname()); + udiProductEntity.setManufactory(thrProductsAddDiEntity.getManufactory()); + udiProductEntity.setSpmc(thrProductsAddDiEntity.getSpmc()); + udiProductEntity.setCpms(thrProductsAddDiEntity.getCpms()); + udiProductEntity.setPrice(thrProductsAddDiEntity.getPrice()); + udiProductEntity.setBasicPrductRemak1(thrProductsAddDiEntity.getBasicPrductRemak1()); + udiProductEntity.setBasicPrductRemak2(thrProductsAddDiEntity.getBasicPrductRemak2()); + udiProductEntity.setBasicPrductRemak3(thrProductsAddDiEntity.getBasicPrductRemak3()); + udiProductEntity.setBasicPrductRemak4(thrProductsAddDiEntity.getBasicPrductRemak4()); + udiProductEntity.setBasicPrductRemak5(thrProductsAddDiEntity.getBasicPrductRemak5()); + udiProductEntity.setBasicPrductRemak6(thrProductsAddDiEntity.getBasicPrductRemak6()); + udiProductEntity.setBasicPrductRemak7(thrProductsAddDiEntity.getBasicPrductRemak7()); + udiProductEntity.setBasicPrductRemak8(thrProductsAddDiEntity.getBasicPrductRemak8()); + udiProductEntity.setGroupBuy(thrProductsAddDiEntity.getGroupBuy()); + udiProductEntity.setCatalogname1(thrProductsAddDiEntity.getCatalogname1()); + udiProductEntity.setCatalogname2(thrProductsAddDiEntity.getCatalogname2()); + udiProductEntity.setCatalogname3(thrProductsAddDiEntity.getCatalogname3()); + udiProductEntity.setMatrial(thrProductsAddDiEntity.getMatrial()); + udiProductEntity.setDiType(1); + + BeanUtil.copyProperties(udiProductEntity,udiRelevanceEntity); + udiRelevanceEntity.setGroupBuy(thrProductsAddDiEntity.getGroupBuy()); + udiRelevanceEntity.setPurType(thrProductsAddDiEntity.getPurType()); + udiRelevanceEntity.setAttributeType(thrProductsAddDiEntity.getAttributeType()); + udiRelevanceEntity.setHcType(thrProductsAddDiEntity.getHcType()); + udiRelevanceEntity.setId(udiRelIdFk); + udiRelevanceEntity.setModifyTime(new Date()); + udiRelevanceEntity.setThirdId(udiProductEntity.getCode()); + udiRelevanceEntity.setMainId(udiProductEntity.getCode()); + udiRelevanceEntity.setUpdateTime(new Date()); + udiRelevanceEntity.setUuid(udiProductEntity.getUuid()); + udiRelevanceEntity.setSupName(thrProductsAddDiEntity.getSupName()); + udiRelevanceEntity.setIsDisable(false); + + + udiProductEntity.setNameCode(null); + udiProductService.insertUdiInfo(udiProductEntity); + udiRelevanceService.insertUdiRelevance(udiRelevanceEntity); + //回填关联关系到关联表 + CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity(); + companyProductRelevanceEntity.setCustomerId(thrProductsAddDiEntity.getCustomerId() + ""); + companyProductRelevanceEntity.setUdiRlIdFk(udiRelIdFk); + companyProductRelevanceEntity.setCreateTime(new Date()); + companyProductRelevanceEntity.setUpdateTime(new Date()); + companyProductRelevanceEntity.setUnitFk(thrProductsAddDiEntity.getCustomerId().toString()); + companyProductRelevanceEntity.setAuditStatus("1"); + if (StrUtil.isNotEmpty(thrProductsAddDiEntity.getPrice())) + companyProductRelevanceEntity.setPrice(new BigDecimal(thrProductsAddDiEntity.getPrice())); + companyProductRelevanceService.insertCompanyProductRelevance(companyProductRelevanceEntity); + if (StrUtil.isNotEmpty(thrProductsAddDiEntity.getSelectThridSysStr())) { + List thirdSysList = JSONUtil.toList(thrProductsAddDiEntity.getSelectThridSysStr(), String.class); + if (thirdSysList.size() > 0) { + for (String thirdSys : thirdSysList) { + BasicNewUploadDiEntity newUploadDiEntity = new BasicNewUploadDiEntity(); + newUploadDiEntity.setRelId(udiRelIdFk + ""); + newUploadDiEntity.setUpdateTime(new Date()); + newUploadDiEntity.setUploadStatus(0); + newUploadDiEntity.setThirdSysFk(thirdSys); + basicNewUploadDiService.insertNewUploadDi(newUploadDiEntity); + } + } + } + thrProductsAddDiEntity.setRemark(remark); + thrProductsAddDiEntity.setStatus(status); + thrProductsAddDiService.updateDiProduct(thrProductsAddDiEntity); + }else { // ThrProductsEntity thrProductsEntity = new ThrProductsEntity(); // BeanUtil.copyProperties(thrProductsAddDiEntity, thrProductsEntity); // thrProductsService.insertThrProducts(thrProductsEntity); @@ -194,9 +283,10 @@ public class ThrProductsAddDiController { ThrSystemEntity basicThirdSysEntity = thrSystemService.selectMainThrSys(); if (basicThirdSysEntity.getThirdId().equals(thrProductsAddDiEntity.getThirdSysFk())) if (!udiContrastService.isExit(null, thrProductsAddDiEntity.getCode(), null)) { - udiContrastService.createOnlyApply(thrProductsAddDiEntity); - thrProductsAddDiEntity.setStatus(4); - thrProductsAddDiService.updateById(thrProductsAddDiEntity); + udiContrastService.createOnlyApply(thrProductsAddDiEntity); + thrProductsAddDiEntity.setStatus(4); + thrProductsAddDiService.updateById(thrProductsAddDiEntity); + } } } else { //选入DI信息审核通过 //审核通过后追加到耗材字典中 @@ -361,6 +451,32 @@ public class ThrProductsAddDiController { return ResultVOUtils.success(); } + /** + * 新增第三方产品信息 + * + * @return + */ + @AuthRuleAnnotation("") + @PostMapping("/udiwms/thrsys/addThrAddProductsNew") + @Log(title = "第三方产品信息", businessType = BusinessType.INSERT) + public BaseResponse addThrAddProductsNew(@RequestBody ThrProductsAddDiEntity thrProductsAdddiEntity) { + if (null == thrProductsAdddiEntity) + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + String customerId = getCustomerId() + ""; + String internalMaterialCode = thrProductsAddDiService.getInternalMaterialCode("10","66"); + thrProductsAdddiEntity.setInternalMaterialCode(internalMaterialCode); + thrProductsAdddiEntity.setCode(internalMaterialCode); + thrProductsAdddiEntity.setThirdSysFk("thirdId"); + thrProductsAdddiEntity.setUuid(CustomUtil.getUUId()); + thrProductsAdddiEntity.setCreateTime(new Date()); + thrProductsAdddiEntity.setStatus(1); //未审核 + thrProductsAdddiEntity.setType(2); + thrProductsAdddiEntity.setCustomerId(Long.parseLong(customerId)); + thrProductsAddDiService.insertThrProducts(thrProductsAdddiEntity); + + return ResultVOUtils.success(); + } + /** * 更新DI产品信息 diff --git a/src/main/java/com/glxp/api/dao/thrsys/ThrProductsAddDiDao.java b/src/main/java/com/glxp/api/dao/thrsys/ThrProductsAddDiDao.java index 48f2928f..8dbaeb89 100644 --- a/src/main/java/com/glxp/api/dao/thrsys/ThrProductsAddDiDao.java +++ b/src/main/java/com/glxp/api/dao/thrsys/ThrProductsAddDiDao.java @@ -46,4 +46,6 @@ public interface ThrProductsAddDiDao extends BaseMapperPlus filterThrProductsDiList(FilterThrProductsRequest filterThrProductsRequest); List filterThrProductsDiLists(FilterThrProductsRequest filterThrProductsRequest); + + String getInternalMaterialCode(@Param("prefix")String prefix); } diff --git a/src/main/java/com/glxp/api/dao/thrsys/ThrProductsDao.java b/src/main/java/com/glxp/api/dao/thrsys/ThrProductsDao.java index 6e345000..30e2139e 100644 --- a/src/main/java/com/glxp/api/dao/thrsys/ThrProductsDao.java +++ b/src/main/java/com/glxp/api/dao/thrsys/ThrProductsDao.java @@ -35,4 +35,6 @@ public interface ThrProductsDao extends BaseMapperPlus voList = excelHandler.importExcel(multipartFile, AddThrDiProductsExcelVo.class, null); +// if (CollectionUtils.isNotEmpty(voList)) { +// log.info("本次成功入:" + voList.size() + "条,数据如下---------------"); +// voList.forEach(excelVo -> { +// ProductInfoEntity productInfoEntity = productInfoService.findByNameCode(excelVo.getNameCode()); +// AddThrDiProductsRequest addThrDiProductsRequest = new AddThrDiProductsRequest(); +// if (productInfoEntity != null) { +// addThrDiProductsRequest.setUuids(List.of(productInfoEntity.getUuid())); +// } else { +// addThrDiProductsRequest.setUuids(List.of("null")); +// } +// //todo +// addThrDiProductsRequest.setSptm(excelVo.getSptm()); +// addThrDiProductsRequest.setManufactory(excelVo.getManufactory()); +// addThrDiProductsRequest.setCpms(excelVo.getCpms()); +// addThrDiProductsRequest.setMeasname(excelVo.getMeasname()); +// addThrDiProductsRequest.setPrice(excelVo.getPrice()); +// addThrDiProductsRequest.setBasicPrductRemak1(excelVo.getBasicPrductRemak1()); +// addThrDiProductsRequest.setSpmc(excelVo.getSpmc()); +// addThrDiProductsRequest.setYbbm(excelVo.getYbbm()); +// addThrDiProductsRequest.setCustomerId(customerId); +// if (StrUtil.isNotEmpty(excelVo.getAttributeType())) { +// if (excelVo.getAttributeType().equals("设备")) { +// addThrDiProductsRequest.setAttributeType(1); +// } else if (excelVo.getAttributeType().equals("耗材")) { +// addThrDiProductsRequest.setAttributeType(2); +// } else if (excelVo.getAttributeType().equals("服务费")) { +// addThrDiProductsRequest.setAttributeType(3); +// } +// } +// +// if (StrUtil.isNotEmpty(excelVo.getGroupBuy())) { +// if (excelVo.getGroupBuy().equals("是")) { +// addThrDiProductsRequest.setGroupBuy(true); +// } else +// addThrDiProductsRequest.setGroupBuy(false); +// } +// if (StrUtil.isNotEmpty(excelVo.getHcType())) { +// if (excelVo.getHcType().equals("高值")) { +// addThrDiProductsRequest.setHcType(1); +// } else if (excelVo.getHcType().equals("低值")) { +// addThrDiProductsRequest.setHcType(2); +// } +// } +// +// if (StrUtil.isNotEmpty(excelVo.getPurType())) { +// if (excelVo.getPurType().equals("普通入账")) { +// addThrDiProductsRequest.setPurType(1); +// } +// if (excelVo.getPurType().equals("预验收")) { +// addThrDiProductsRequest.setPurType(2); +// } else +// addThrDiProductsRequest.setPurType(3); +// } +// addThrAddDiProducts(addThrDiProductsRequest); +// +// //1.校验国家库信息 +//// addThrDiProductsRequest.setAttributeType(); +// +// +// }); +// +// } +// } catch (Exception e) { +// throw new RenException("导入失败"); +// } +// } + @Resource + ThrProductsAddDiService thrProductsAddDiService; + @Transactional(rollbackFor = Exception.class) public void excelImport(MultipartFile multipartFile, Long customerId) { try { List voList = excelHandler.importExcel(multipartFile, AddThrDiProductsExcelVo.class, null); if (CollectionUtils.isNotEmpty(voList)) { log.info("本次成功入:" + voList.size() + "条,数据如下---------------"); voList.forEach(excelVo -> { - ProductInfoEntity productInfoEntity = productInfoService.findByNameCode(excelVo.getNameCode()); - AddThrDiProductsRequest addThrDiProductsRequest = new AddThrDiProductsRequest(); - if (productInfoEntity != null) { - addThrDiProductsRequest.setUuids(List.of(productInfoEntity.getUuid())); - } else { - addThrDiProductsRequest.setUuids(List.of("null")); + ThrProductsAddDiEntity thrProductsAdddiEntity = new ThrProductsAddDiEntity(); + String internalMaterialCode = thrProductsAddDiService.getInternalMaterialCode("10","66"); + thrProductsAdddiEntity.setInternalMaterialCode(internalMaterialCode); + thrProductsAdddiEntity.setCode(internalMaterialCode); + thrProductsAdddiEntity.setThirdSysFk("thirdId"); + thrProductsAdddiEntity.setUuid(CustomUtil.getUUId()); + thrProductsAdddiEntity.setCreateTime(new Date()); + thrProductsAdddiEntity.setStatus(1); //未审核 + thrProductsAdddiEntity.setType(2); + thrProductsAdddiEntity.setCustomerId(customerId); + thrProductsAdddiEntity.setSpec(excelVo.getSpec()); + thrProductsAdddiEntity.setSpmc(excelVo.getSpmc()); + thrProductsAdddiEntity.setName(excelVo.getSpmc()); + thrProductsAdddiEntity.setMeasname(excelVo.getMeasname()); + thrProductsAdddiEntity.setManufactory(excelVo.getManufactory()); + thrProductsAdddiEntity.setZczbhhzbapzbh(excelVo.getZczbhhzbapzbh()); + thrProductsAdddiEntity.setPrice(excelVo.getPrice()); + thrProductsAdddiEntity.setSupName(excelVo.getSupName()); + thrProductsAdddiEntity.setSourceType(1); + //医保编码解析 + String catalogcode = excelVo.getYbbm(); + thrProductsAdddiEntity.setYbbm(excelVo.getYbbm()); + if (StrUtil.isNotEmpty(catalogcode) && catalogcode.length() >= 7) { + Integer catalogcode1 = Integer.valueOf(catalogcode.substring(1, 3)); + Integer catalogcode2 = Integer.valueOf(catalogcode1 + catalogcode.substring(3, 5)); + Integer catalogcode3 = Integer.valueOf(catalogcode2 + catalogcode.substring(5, 7)); + thrProductsAdddiEntity.setCatalogCode1(catalogcode1); + thrProductsAdddiEntity.setCatalogCode2(catalogcode2); + thrProductsAdddiEntity.setCatalogCode3(catalogcode3); } - //todo - addThrDiProductsRequest.setSptm(excelVo.getSptm()); - addThrDiProductsRequest.setManufactory(excelVo.getManufactory()); - addThrDiProductsRequest.setCpms(excelVo.getCpms()); - addThrDiProductsRequest.setMeasname(excelVo.getMeasname()); - addThrDiProductsRequest.setPrice(excelVo.getPrice()); - addThrDiProductsRequest.setBasicPrductRemak1(excelVo.getBasicPrductRemak1()); - addThrDiProductsRequest.setSpmc(excelVo.getSpmc()); - addThrDiProductsRequest.setYbbm(excelVo.getYbbm()); - addThrDiProductsRequest.setCustomerId(customerId); if (StrUtil.isNotEmpty(excelVo.getAttributeType())) { if (excelVo.getAttributeType().equals("设备")) { - addThrDiProductsRequest.setAttributeType(1); + thrProductsAdddiEntity.setAttributeType(1); } else if (excelVo.getAttributeType().equals("耗材")) { - addThrDiProductsRequest.setAttributeType(2); + thrProductsAdddiEntity.setAttributeType(2); } else if (excelVo.getAttributeType().equals("服务费")) { - addThrDiProductsRequest.setAttributeType(3); + thrProductsAdddiEntity.setAttributeType(3); } } - - if (StrUtil.isNotEmpty(excelVo.getGroupBuy())) { - if (excelVo.getGroupBuy().equals("是")) { - addThrDiProductsRequest.setGroupBuy(true); - } else - addThrDiProductsRequest.setGroupBuy(false); - } - if (StrUtil.isNotEmpty(excelVo.getHcType())) { - if (excelVo.getHcType().equals("高值")) { - addThrDiProductsRequest.setHcType(1); - } else if (excelVo.getHcType().equals("低值")) { - addThrDiProductsRequest.setHcType(2); - } - } - if (StrUtil.isNotEmpty(excelVo.getPurType())) { - if (excelVo.getPurType().equals("普通入账")) { - addThrDiProductsRequest.setPurType(1); + if (excelVo.getPurType().equals("入账")) { + thrProductsAdddiEntity.setPurType(1); } if (excelVo.getPurType().equals("预验收")) { - addThrDiProductsRequest.setPurType(2); + thrProductsAdddiEntity.setPurType(2); } else - addThrDiProductsRequest.setPurType(3); + thrProductsAdddiEntity.setPurType(3); } - addThrAddDiProducts(addThrDiProductsRequest); - - //1.校验国家库信息 -// addThrDiProductsRequest.setAttributeType(); - - + thrProductsAddDiService.insertThrProducts(thrProductsAdddiEntity); }); - } } catch (Exception e) { + System.out.println(e); throw new RenException("导入失败"); } } + public String getInternalMaterialCode(String index1,String index2) { + String prefix = index1+index2; + String addDiCode = thrProductsAddDiDao.getInternalMaterialCode(prefix); + if (StrUtil.isEmpty(addDiCode) ){ + int incrementedNumber = 1; + return prefix+String.format("%09d", incrementedNumber); + }else{ + // 去除前缀并转换为数字加1 + int incrementedNumber = incrementNumberAfterPrefix(addDiCode, prefix); + return prefix+String.format("%09d", incrementedNumber); + } + } + + public static int incrementNumberAfterPrefix(String originalString, String prefix) { + // 检查字符串是否以指定前缀开始 + if (originalString != null && originalString.startsWith(prefix)) { + // 去除前缀 + String numberString = originalString.substring(prefix.length()); + + // 尝试将剩余部分转换为整数并加1 + try { + int number = Integer.parseInt(numberString); + return number + 1; + } catch (NumberFormatException e) { + // 如果剩余部分不是有效的数字,则抛出异常或进行其他处理 + throw new IllegalArgumentException("Remaining string is not a valid number: " + numberString); + } + } else { + // 如果字符串不以指定前缀开始,则抛出异常或进行其他处理 + throw new IllegalArgumentException("String does not start with the specified prefix: " + prefix); + } + } } diff --git a/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml b/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml index 5eb8e189..07e0d858 100644 --- a/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml +++ b/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml @@ -482,6 +482,9 @@ AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%') + + AND mainId LIKE concat('%', #{mainIdLike}, '%') + AND relCode = #{relCode} diff --git a/src/main/resources/mybatis/mapper/basic/UdiRlSupDao.xml b/src/main/resources/mybatis/mapper/basic/UdiRlSupDao.xml index 1e7e3e44..e2d67424 100644 --- a/src/main/resources/mybatis/mapper/basic/UdiRlSupDao.xml +++ b/src/main/resources/mybatis/mapper/basic/UdiRlSupDao.xml @@ -133,6 +133,9 @@ AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc}, '%') + + AND basic_udirel.mainId LIKE concat('%',#{mainId}, '%') + AND cpmctymc LIKE concat(#{cpmctymc}, '%') diff --git a/src/main/resources/mybatis/mapper/thrsys/ThrProductsAddDiDao.xml b/src/main/resources/mybatis/mapper/thrsys/ThrProductsAddDiDao.xml index dc2b0213..16556e47 100644 --- a/src/main/resources/mybatis/mapper/thrsys/ThrProductsAddDiDao.xml +++ b/src/main/resources/mybatis/mapper/thrsys/ThrProductsAddDiDao.xml @@ -188,6 +188,9 @@ AND tdi.status = #{checkStatus} + + AND tdi.sourceType = #{sourceType} + AND tdi.id = #{id} @@ -203,6 +206,9 @@ AND tdi.name like concat('%', #{name}, '%') + + AND tdi.internalMaterialCode like concat('%', #{internalMaterialCode}, '%') + AND tdi.spec = #{spec} @@ -262,4 +268,10 @@ + + diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index cab96f36..ca81f6a6 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -627,3 +627,54 @@ CALL Pro_Temp_ColumnWork('device_repair', 'repairBillNo', CALL Pro_Temp_ColumnWork('device_upkeep', 'taskBillNo', 'varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''保养任务单号''', 1); + + +UPDATE auth_menu SET `menu_name` = '选入入院产品', `parent_id` = 1819, `order_num` = 3, `path` = 'supplier/products/supProductsOptinDi', + `component` = 'supplier/products/supProductsOptinDi', `query_param` = NULL, `is_frame` = 1, `is_cache` = 0, `menu_type` = 'C', + `visible` = '0', `status` = '0', `perms` = NULL, `icon` = NULL, `create_by` = '超级用户', `create_time` = '2023-02-17 10:04:07', + `update_by` = NULL, `update_time` = NULL, `remark` = NULL WHERE `menu_id` = 1759; + +INSERT ignore INTO auth_menu(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, + `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES + (2013, '新增入院产品', 1819, 3, 'supplier/products/supProductsAddDi', 'supplier/products/supProductsAddDi', + NULL, 1, 0, 'C', '0', '0', NULL, NULL, '超级用户', '2023-02-17 10:04:07', NULL, NULL, NULL); + +UPDATE sys_custom_config SET `businessType` = 'supProductsAddDi', `remark` = '新增入院产品', `type` = '1', `handleChangeFuc` = NULL WHERE `id` = 22; +INSERT ignore INTO sys_custom_config(`id`, `businessType`, `remark`, `type`, `handleChangeFuc`) VALUES (84, 'supProductsOptinDi', '选入入院产品', '1', NULL); + + +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2105, 84, '2', 1, 'code', 'DI产品标识', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2106, 84, '2', 1, 'name', '物资名称', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2107, 84, '2', 1, 'spec', '规格型号', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2108, 84, '2', 1, 'registerNo', '注册证编号', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2109, 84, '2', 1, 'checkStatus', '审核状态', 'select', NULL, NULL, '{\"1\":\"未审核\",\"2\":\"已审核\",\"3\":\"未通过\",\"\":\"全部\"}', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2110, 84, '1', 1, 'index', '序号', 'id', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2111, 84, '1', 1, 'code', '物资产品标识', 'text', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2112, 84, '1', 1, 'name', '物资名称', 'text', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2113, 84, '1', 1, 'spec', '规格型号', 'text', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2114, 84, '1', 1, 'ylqxzcrbarmc', '医疗器械注册人', 'text', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2115, 84, '1', 1, 'registerNo', '注册证编号', 'text', NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2116, 84, '1', 1, 'status', '审核状态', 'laber', '', NULL, '{\"1\":\"未审核\",\"2\":\"已审核\",\"3\":\"未通过\"}', NULL, 1, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2117, 84, '1', 1, 'oper', '操作', 'button', '', NULL, '', 120, NULL, '[{\"type\":\"text\",\"size\":\"small\",\"style\":\"\",\"name\":\"详情\",\"clickFuc\":\"detail\",\"disabledFuc\":\"\",\"hasPermi\":\"\"},{\"type\":\"text\",\"size\":\"small\",\"style\":\"\",\"name\":\"删除\",\"clickFuc\":\"deleteProduct\",\"disabledFuc\":\"row.status == 2\",\"hasPermi\":\"\"}]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + + +CALL Pro_Temp_ColumnWork('thr_products_add_di', 'sourceType', + 'bit(1) NOT NULL DEFAULT b''0'' COMMENT ''来源类型 1新增;0选入''', + 1); + + +CALL Pro_Temp_ColumnWork('thr_products_add_di', 'internalMaterialCode', + 'varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT ''内部物资编码''', + 1); +UPDATE sys_custom_config_detail SET `configId` = 22, `type` = '1', `isShow` = 1, `columnName` = 'internalMaterialCode', `columnDesc` = '内部物资编码', `columnType` = 'text', `colorRule` = NULL, `sort` = NULL, `lableRule` = NULL, `width` = NULL, `tooltip` = 1, `buttonRule` = NULL, `number` = NULL, `lineNumber` = NULL, `clickFuc` = NULL, `size` = NULL, `style` = NULL, `disabled` = NULL, `checkRules` = NULL, `inputType` = NULL, `disabledFuc` = NULL, `expression` = NULL, `dataFuc` = NULL, `isShowXx` = NULL WHERE `id` = 275; + +INSERT ignore INTO sys_custom_config_detail (`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2118, 32, '1', 1, 'internalMaterialCode', '内部物资编码', 'text', NULL, NULL, NULL, NULL, 1, NULL, 99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_param_config (`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`, `updateTime`) VALUES (1070, 0, '开启内部物资编码', 'internal_material_code', '1', 1, 0, '开启内部物资编码 0:否;1:是', NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2019, 18, '2', 1, 'mainId', '内部物资编码', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2020, 22, '2', 1, 'internalMaterialCode', '内部物资编码', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +INSERT ignore INTO sys_custom_config_detail(`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (2021, 8, '2', 1, 'mainIdLike', '内部物资编码', 'input', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + + +CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'codeCheck', + 'tinyint NULL DEFAULT NULL COMMENT '' 是否开启校验扫码 :0:不校验;1:只允许录入扫码产品;2:只允许录入不扫码产品''', 1);