Merge remote-tracking branch 'origin/orderChange' into zhairh

zhairh
x_z 2 years ago
commit 8615658570

@ -122,7 +122,8 @@ public class StockOrderDetailController {
if (CollUtil.isNotEmpty(codeList)) {
for (WarehouseEntity codeDetaiEntity : codeList) {
if (StrUtil.trimToEmpty(codeDetaiEntity.getRelId()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getRelId()))
&& StrUtil.trimToEmpty(codeDetaiEntity.getBatchNo()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo()))
&&
(StrUtil.isEmpty(codeDetaiEntity.getBatchNo()) || StrUtil.trimToEmpty(codeDetaiEntity.getBatchNo()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo())))
) {
StockOrderDetailEntity item = new StockOrderDetailEntity();
BeanUtils.copyProperties(stockOrderDetailEntity, item);
@ -594,23 +595,23 @@ public class StockOrderDetailController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
//判断
InvProductEntity invProductEntity=invProductService.selectExit(stockOrderDetailFilterRequest.getProductId());
if(invProductEntity!=null){
UdiInfoEntity udiInfoEntity= udiInfoService.findByNameCode(invProductEntity.getNameCode());
if(udiInfoEntity!=null){
if(udiInfoEntity.getScbssfbhph().equals("是")){
if(stockOrderDetailFilterRequest.getBatchNo()==null){
return ResultVOUtils.error(999,"批次号不能为空!");
InvProductEntity invProductEntity = invProductService.selectExit(stockOrderDetailFilterRequest.getProductId());
if (invProductEntity != null) {
UdiInfoEntity udiInfoEntity = udiInfoService.findByNameCode(invProductEntity.getNameCode());
if (udiInfoEntity != null) {
if (udiInfoEntity.getScbssfbhph().equals("是")) {
if (stockOrderDetailFilterRequest.getBatchNo() == null) {
return ResultVOUtils.error(999, "批次号不能为空!");
}
}
if(udiInfoEntity.getScbssfbhscrq().equals("是")){
if(stockOrderDetailFilterRequest.getProductDate()==null){
return ResultVOUtils.error(999,"生产日期不能为空!");
if (udiInfoEntity.getScbssfbhscrq().equals("是")) {
if (stockOrderDetailFilterRequest.getProductDate() == null) {
return ResultVOUtils.error(999, "生产日期不能为空!");
}
}
if(udiInfoEntity.getScbssfbhsxrq().equals("是")){
if(stockOrderDetailFilterRequest.getExpireDate()==null){
return ResultVOUtils.error(999,"失效日期不能为空!");
if (udiInfoEntity.getScbssfbhsxrq().equals("是")) {
if (stockOrderDetailFilterRequest.getExpireDate() == null) {
return ResultVOUtils.error(999, "失效日期不能为空!");
}
}
}

@ -45,6 +45,7 @@ import com.glxp.api.admin.service.inventory.StockPrintTempService;
import com.glxp.api.admin.thread.IoTransInoutService;
import com.glxp.api.admin.thread.JaspaperService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.FileUtils;
import com.glxp.api.admin.util.JasperUtils;
import com.glxp.api.common.enums.ResultEnum;
@ -413,7 +414,14 @@ public class StockQRCodeTextController {
stockOrderPrintEntity.setRemark1(systemPDFModuleEntity.getRemark1());
stockOrderPrintEntity.setRemark2(systemPDFModuleEntity.getRemark2());
stockOrderPrintEntity.setRemark3(systemPDFModuleEntity.getRemark3());
stockOrderPrintEntity.setBillRemark(orderEntity.getPrintRemark());
if (StrUtil.isNotEmpty(stockOrderPrintEntity.getProductDate())) {
stockOrderPrintEntity.setProductDate(DateUtil.formatExpireTime("20" + stockOrderPrintEntity.getProductDate()));
}
if (StrUtil.isNotEmpty(stockOrderPrintEntity.getExpireDate())) {
stockOrderPrintEntity.setExpireDate(DateUtil.formatExpireTime("20" + stockOrderPrintEntity.getExpireDate()));
}
if (orderEntity != null)
stockOrderPrintEntity.setBillRemark(orderEntity.getPrintRemark());
if (systemParamConfigEntity.getParamValue().equals("1")) {
@ -464,6 +472,13 @@ public class StockQRCodeTextController {
StockOrderDetailEntity stockOrderDetailEntity = getDetailByRelBatch(stockOrderDetailEntities, stockOrderPrintEntity.getProductId(), stockOrderPrintEntity.getBatchNo());
if (stockOrderDetailEntity != null) {
stockOrderPrintEntity.setPrice(stockOrderDetailEntity.getPrice());
stockOrderPrintEntity.setZczbhhzbapzbh(stockOrderDetailEntity.getZczbhhzbapzbh());
if (StrUtil.isNotEmpty(stockOrderDetailEntity.getProductDate())) {
stockOrderPrintEntity.setProductDate(DateUtil.formatExpireTime("20" + stockOrderDetailEntity.getProductDate()));
}
if (StrUtil.isNotEmpty(stockOrderDetailEntity.getExpireDate())) {
stockOrderPrintEntity.setExpireDate(DateUtil.formatExpireTime("20" + stockOrderDetailEntity.getExpireDate()));
}
}
stockOrderPrintEntity.setCount(stockOrderPrintEntity.getCount() * getActCount(stockOrderPrintEntity));

@ -928,20 +928,20 @@ public class WareHouseController {
if (warehouseEntityList.get(i).getCode().equals(code)) {
return drugCodeSelectEntity;
}
UdiEntity originUdiEntity = FilterUdiUtils.getUdi(drugCodeSelectEntity.getCode());
if (!StrUtil.emptyIfNull(originUdiEntity.getUdi()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) {
// UdiEntity originUdiEntity = FilterUdiUtils.getUdi(drugCodeSelectEntity.getCode());
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getNameCode()).equals(StrUtil.emptyIfNull(udiEntity.getUdi()))) {
continue;
}
if (!StrUtil.emptyIfNull(originUdiEntity.getBatchNo()).toUpperCase(Locale.ROOT).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()).toUpperCase(Locale.ROOT))) {
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getBatchNo()).toUpperCase(Locale.ROOT).equals(StrUtil.emptyIfNull(udiEntity.getBatchNo()).toUpperCase(Locale.ROOT))) {
continue;
}
if (!StrUtil.emptyIfNull(originUdiEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) {
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getProduceDate()).equals(StrUtil.emptyIfNull(udiEntity.getProduceDate()))) {
continue;
}
if (!StrUtil.emptyIfNull(originUdiEntity.getExpireDate()).equals(StrUtil.emptyIfNull(udiEntity.getExpireDate()))) {
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getExpireDate()).equals(StrUtil.emptyIfNull(udiEntity.getExpireDate()))) {
continue;
}
if (!StrUtil.emptyIfNull(originUdiEntity.getSerialNo()).equals(StrUtil.emptyIfNull(udiEntity.getSerialNo()))) {
if (!StrUtil.emptyIfNull(drugCodeSelectEntity.getSerialNo()).equals(StrUtil.emptyIfNull(udiEntity.getSerialNo()))) {
continue;
}
return drugCodeSelectEntity;
@ -1376,12 +1376,12 @@ public class WareHouseController {
if (null == id)
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
WarehouseBussinessTypeEntity warehouseBussinessTypeEntity = warehouseBussinessTypeService.selectById(id);
FilterInvBusUserRequest filterInvBusUserRequest=new FilterInvBusUserRequest();
FilterInvBusUserRequest filterInvBusUserRequest = new FilterInvBusUserRequest();
filterInvBusUserRequest.setScAction(warehouseBussinessTypeEntity.getAction());
filterInvBusUserRequest.setSubInvCode(warehouseBussinessTypeEntity.getCode());
List<InvBusUserEntity> invBusUserEntityList=invBusUserService.filterInvBusUser(filterInvBusUserRequest);
if(invBusUserEntityList.size()>0){
return ResultVOUtils.error(999,"有用户关联该单据请先移除再进行删除!");
List<InvBusUserEntity> invBusUserEntityList = invBusUserService.filterInvBusUser(filterInvBusUserRequest);
if (invBusUserEntityList.size() > 0) {
return ResultVOUtils.error(999, "有用户关联该单据请先移除再进行删除!");
}
InvSubWarehouseEntity invSubWarehouseEntity =

@ -119,7 +119,7 @@ public class CheckOrderUtils {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_SUCCESS);
orderEntity.setContrastStatus(ConstantStatus.ORDER_CHECK_SUCCESS);
orderEntity.setUpdateTime(new Date());
orderService.updateOrder(orderEntity);
//更新业务单据为已校验
List<String> erpIds = DataTransUtil.strToErpList(orderEntity.getErpFk());
@ -138,9 +138,10 @@ public class CheckOrderUtils {
}
if (status.equals(ConstantStatus.SORDER_DELIVER)) {
orderEntity.setReceiveStatus(1);
orderService.updateOrder(orderEntity);
invProductsTrService.genInvProducts(orderEntity.getId());
}
orderService.updateOrder(orderEntity);
} else {
for (ErpOrderEntity erpOrderEntity : vailOrderEntities) {
@ -280,6 +281,8 @@ public class CheckOrderUtils {
return null;
} else if (StrUtil.isEmpty(vailOrderEntity.getBatchNo()) && StrUtil.isEmpty(myErpOrder.getBatchNo())) {
return null;
} else if (StrUtil.isEmpty(myErpOrder.getBatchNo())) {
return null;
} else {
return myErpOrder.getCoName() + "批次号不匹配!";
}
@ -292,6 +295,8 @@ public class CheckOrderUtils {
return null;
} else if (StrUtil.isEmpty(vailOrderEntity.getProductDate()) && StrUtil.isEmpty(myErpOrder.getProductDate())) {
return null;
} else if (StrUtil.isEmpty(myErpOrder.getProductDate())) {
return null;
} else {
return myErpOrder.getCoName() + "生产日期不匹配!";
}
@ -305,6 +310,8 @@ public class CheckOrderUtils {
return null;
} else if (StrUtil.isEmpty(vailOrderEntity.getExpireDate()) && StrUtil.isEmpty(myErpOrder.getExpireDate())) {
return null;
} else if (StrUtil.isEmpty(myErpOrder.getExpireDate())) {
return null;
} else {
return myErpOrder.getCoName() + "失效日期不匹配!";
}

@ -119,14 +119,9 @@ public class InvPreInProductDetailServiceImpl implements InvPreInProductDetailSe
if (CollUtil.isNotEmpty(datas)) {
InvProductDetailEntity invProductDetailEntity = datas.get(0);
String bacthNo = null;
if (StrUtil.isEmpty(invProductDetailEntity.getBatchNo())) {
bacthNo = "empty";
} else {
bacthNo = invProductDetailEntity.getBatchNo();
for (int i = 1; i < datas.size(); i++) {
invProductDetailEntity.setCount(invProductDetailEntity.getCount() + datas.get(i).getCount());
}
// InvProductEntity invProductEntity = invPreInProductDao.selectByUuid(invProductDetailEntity.getProductIdFk(), bacthNo, invProductDetailEntity.getSupId(), invProductDetailEntity.getInvStorageCode(), invProductDetailEntity.getInvWarehouseCode());
// invProductDetailEntity.setCount(invProductEntity.getInCount() - invProductEntity.getOutCount());
return invProductDetailEntity;
}
return null;

@ -320,7 +320,7 @@ public class InvProductsTrService {
preiInList.add(warehouseEntity);
} else if (warehouseEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
int lea = count - invCount;
warehouseEntity.setCount(lea / (warehouseEntity.getCount())); //
warehouseEntity.setCount(lea / (actCount));
preiInList.add(warehouseEntity);
}
}
@ -366,7 +366,7 @@ public class InvProductsTrService {
inList.add(warehouseEntity);
} else if (warehouseEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
int lea = count - invCount;
warehouseEntity.setCount(lea / (warehouseEntity.getCount())); //
warehouseEntity.setCount(lea / (actCount)); //
inList.add(warehouseEntity);
}
}
@ -436,7 +436,7 @@ public class InvProductsTrService {
prePutList.add(warehouseEntity);
} else if (warehouseEntity.getSerialNo() == null) { //无序列号(多级包装无序列号的已在上一步被排除),补齐数量
int lea = count - invCount;
warehouseEntity.setCount(lea / (warehouseEntity.getCount())); //
warehouseEntity.setCount(lea / (actCount)); //
prePutList.add(warehouseEntity);
}
}

@ -543,4 +543,14 @@ public class DateUtil extends org.apache.commons.lang3.time.DateUtils {
}
return null;
}
public static String formatExpireTime(String str) {
try {
Date date = DateUtil.parseDate(str, "yyyyMMdd");
return formatDate(date, "yyyy-MM-dd");
} catch (ParseException e) {
e.printStackTrace();
}
return str;
}
}

@ -1,8 +1,8 @@
server.port=9991
server.port=9992
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://127.0.0.1:3306/udiwms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.jdbc-url=jdbc:mysql://192.168.0.66:3364/udiwms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.password=Glxp@6066
spring.datasource.hikari.connection-timeout=60000
spring.datasource.hikari.maximum-pool-size=60
spring.datasource.hikari.minimum-idle=10

@ -38,7 +38,7 @@
and customerId = #{customerId}
</if>
</where>
limit 1
</select>

@ -14,5 +14,6 @@ VALUES
-- 创建表时必须 create table if not exists 表名

Loading…
Cancel
Save