Merge remote-tracking branch 'origin/dev' into dev

pro
郑明梁 2 years ago
commit adb9428e36

@ -10,86 +10,91 @@ public class ConstantStatus {
/**
* (稿
*/
public static final Integer ORDER_STATUS_TEMP_SAVE = 1;
public static final int ORDER_STATUS_TEMP_SAVE = 1;
/**
*
*/
public static final Integer ORDER_STATUS_PROCESS = 2;
public static final int ORDER_STATUS_PROCESS = 2;
/**
*
*/
public static final Integer ORDER_STATUS_CHECK = 3;
public static final int ORDER_STATUS_CHECK = 3;
/**
*
*/
public static final Integer ORDER_STATS_ERROR = 4;
public static final int ORDER_STATS_ERROR = 4;
/**
*
*/
public static final Integer ORDER_STATUS_CHECK_SUCCESS = 5;
public static final int ORDER_STATUS_CHECK_SUCCESS = 5;
/**
*
*/
public static final Integer ORDER_STATUS_CHECK_FAIL = 6;
public static final int ORDER_STATUS_CHECK_FAIL = 6;
/**
*
*/
public static final Integer ORDER_STATUS_CHECK_REW = 10;
public static final int ORDER_STATUS_CHECK_REW = 10;
/**
*
*/
public static final Integer ORDER_STATUS_AUDITED = 7;
public static final int ORDER_STATUS_AUDITED = 7;
/**
*
*/
public static final Integer ORDER_STATUS_AUDITED_REFUSED = 8;
public static final int ORDER_STATUS_AUDITED_REFUSED = 8;
/**
*
*/
public static final Integer ORDER_STATUS_PROCESSING = 9;
public static final int ORDER_STATUS_PROCESSING = 9;
/**
*
*/
public static final int ORDER_STATUS_CHECK_PROCESS = 12;
/**
*
*/
public static final Integer ORDER_STATUS_ALLOCATE = 11;
public static final int ORDER_STATUS_ALLOCATE = 11;
public static final Integer ORDER_DELIVERY_STATUS_UN = 1;
public static final Integer ORDER_DELIVERY_STATUS_ED = 2;
public static final int ORDER_DELIVERY_STATUS_UN = 1;
public static final int ORDER_DELIVERY_STATUS_ED = 2;
/**
* 2.13,4:
*/
public static final Integer ORDER_TYPE_BIZ = 1;
public static final Integer ORDER_TYPE_SCAN = 2;
public static final Integer ORDER_TYPE_NORMAL = 3;
public static final Integer ORDER_TYPE_WAIT = 4;
public static final int ORDER_TYPE_BIZ = 1;
public static final int ORDER_TYPE_SCAN = 2;
public static final int ORDER_TYPE_NORMAL = 3;
public static final int ORDER_TYPE_WAIT = 4;
/**
*
*/
public static final Integer BUS_TYPE_NORMAL = 1; //正常出入库单据(入账)
public static final Integer BUS_TYPE_DELIVERY = 2; //送货出入库单据
public static final Integer BUS_TYPE_ARRIVAL = 3; //到货出库单据类型
public static final Integer BUS_TYPE_RETURNED = 4; //退货单单据类型
public static final Integer BUS_TYPE_INVOICE = 4; //退货单单据类型
public static final int BUS_TYPE_NORMAL = 1; //正常出入库单据(入账)
public static final int BUS_TYPE_DELIVERY = 2; //送货出入库单据
public static final int BUS_TYPE_ARRIVAL = 3; //到货出库单据类型
public static final int BUS_TYPE_RETURNED = 4; //退货单单据类型
public static final int BUS_TYPE_INVOICE = 4; //退货单单据类型
public static final Integer ACTION_TYPE_NORMAL = 1; //带票
public static final Integer ACTION_TYPE_PREIN = 2; //预验收
public static final Integer ACTION_TYPE_ADVANCE = 3; //寄售
public static final int ACTION_TYPE_NORMAL = 1; //带票
public static final int ACTION_TYPE_PREIN = 2; //预验收
public static final int ACTION_TYPE_ADVANCE = 3; //寄售
public static final int ORDER_SPUSE_NO = 0; //不允许供应商使用
@ -97,41 +102,41 @@ public class ConstantStatus {
public static final int ORDER_SPUSE_EDIT = 2; //允许供应商编辑
public static final Integer ORDER_STATUS_ADDITIONAL = 5; //补录单据
// public static final Integer ORDER_STATUS_RECEIVEED = 7;
public static final int ORDER_STATUS_ADDITIONAL = 5; //补录单据
// public static final int ORDER_STATUS_RECEIVEED = 7;
//订单处理状态
public static final Integer ORDER_DEAL_DRAFT = 1; //草稿
public static final Integer ORDER_DEAL_POST = 2; //已提交,待交接
public static final Integer ORDER_DEAL_REW = 4; //交接中,待审核
public static final Integer ORDER_DEAL_CHECK = 3; //已审核
public static final int ORDER_DEAL_DRAFT = 1; //草稿
public static final int ORDER_DEAL_POST = 2; //已提交,待交接
public static final int ORDER_DEAL_REW = 4; //交接中,待审核
public static final int ORDER_DEAL_CHECK = 3; //已审核
//ERP校验状态
public static final Integer ORDER_CHECK_SUCCESS = 2; //校验成功
public static final Integer ORDER_CHECK_FAIL = 1; //校验失败
public static final Integer ORDER_CHECK_UN = 0; //未校验
public static final int ORDER_CHECK_SUCCESS = 2; //校验成功
public static final int ORDER_CHECK_FAIL = 1; //校验失败
public static final int ORDER_CHECK_UN = 0; //未校验
//ERP订单上传状态
public static final Integer ORDER_EXPORT_UN = 0; //未导出
public static final Integer ORDER_EXPORT_ED = 1; //已导出
public static final Integer ORDER_EXPORT_FAIL = 2; //导出失败
public static final int ORDER_EXPORT_UN = 0; //未导出
public static final int ORDER_EXPORT_ED = 1; //已导出
public static final int ORDER_EXPORT_FAIL = 2; //导出失败
//ERP订单签字状态
public static final Integer ORDER_SIGN_UN = 0; //未签字
public static final Integer ORDER_SIGN_ED = 1; //已签字
public static final Integer ORDER_SIGN_FAIL = 2; //签字失败
public static final int ORDER_SIGN_UN = 0; //未签字
public static final int ORDER_SIGN_ED = 1; //已签字
public static final int ORDER_SIGN_FAIL = 2; //签字失败
//UDI产品信息表字段类型
public static final Integer PRODUCT_TYPE_UDI = 0;
public static final Integer PRODUCT_TYPE_THIRD = 1;
public static final int PRODUCT_TYPE_UDI = 0;
public static final int PRODUCT_TYPE_THIRD = 1;
//DI类型
public static final Integer DI_TYPE_MAIN = 1;//主标识
public static final Integer DI_TYPE_SYDY = 2;//使用单元
public static final Integer DI_TYPE_BTBS = 3;//本体标识
public static final Integer DI_TYPE_BZBS = 4;//包装标识
public static final int DI_TYPE_MAIN = 1;//主标识
public static final int DI_TYPE_SYDY = 2;//使用单元
public static final int DI_TYPE_BTBS = 3;//本体标识
public static final int DI_TYPE_BZBS = 4;//包装标识
//业务单据状态
@ -174,8 +179,8 @@ public class ConstantStatus {
//采购类型
public static final Integer PRUCHASE_ADVANCE = 1; //预入库
public static final Integer PRUCHASE_COMMON = 2; //普通采购
public static final int PRUCHASE_ADVANCE = 1; //预入库
public static final int PRUCHASE_COMMON = 2; //普通采购
//往来单位类型

@ -280,7 +280,10 @@ public class BasicOrderPrintController {
Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i);
bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode());
bizData.put("udiCode", udiProductEntity.getUuid() == null ? ' ' : udiProductEntity.getUuid());
String udiCode = "#" + obj.getNameCode() + "#" + obj.getProduceDate() + "#" + obj.getExpireDate() +
"#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + obj.getWarehouseCode() + "#" + obj.getDeptCode();
udiCode = udiCode.replaceAll("#null", "#");
bizData.put("udiCode", udiCode);
bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc());
bizData.put("ggxh", udiProductEntity.getGgxh() == null ? ' ' : udiProductEntity.getGgxh());
bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo());
@ -300,5 +303,4 @@ public class BasicOrderPrintController {
}
}

@ -51,6 +51,10 @@ import java.util.Date;
import java.util.List;
import static com.glxp.api.constant.ConstantStatus.ORDER_STATUS_CHECK_PROCESS;
import static com.glxp.api.constant.ConstantStatus.ORDER_STATUS_PROCESSING;
@Slf4j
@RestController
public class IoOrderController extends BaseController {
@ -192,6 +196,10 @@ public class IoOrderController extends BaseController {
@Log(title = "单据管理", businessType = BusinessType.UPDATE)
public BaseResponse submitBiz(@RequestBody AddOrderRequest addOrderRequest) {
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
BaseResponse tempResponse = checkSubmitEnable(orderEntity);
if (tempResponse != null)
return tempResponse;
//校验单据是否已完成
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(addOrderRequest.getBillNo());
@ -219,7 +227,7 @@ public class IoOrderController extends BaseController {
}
}
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
ioAddInoutService.dealBusProcess(orderEntity, addOrderRequest.getFromVailPi());
return ResultVOUtils.success("提交成功!");
}
@ -237,6 +245,13 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.error(500, "单据未扫码或扫码校验无法通过,提交失败,请检查后重新提交!");
}
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
BaseResponse tempResponse = checkSubmitEnable(orderEntity);
if (tempResponse != null)
return tempResponse;
if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_TEMP_SAVE)
ioAddInoutService.dealProcess(orderEntity);
//不需要手动校验,则走正常单据校验处理流程
@ -283,6 +298,11 @@ public class IoOrderController extends BaseController {
@Log(title = "单据管理", businessType = BusinessType.UPDATE)
public BaseResponse submitOrderWeb(@RequestBody AddOrderRequest addOrderRequest) {
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
BaseResponse tempResponse = checkSubmitEnable(orderEntity);
if (tempResponse != null)
return tempResponse;
//校验单据是否已完成
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(addOrderRequest.getBillNo());
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(addOrderRequest.getBillNo());
@ -304,8 +324,7 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.error(500, errMsg);
}
saveOrderWeb(addOrderRequest);
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
orderEntity.setStatus(ORDER_STATUS_CHECK_PROCESS);
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
orderService.update(orderEntity);
checkInoutService.check(addOrderRequest.getBillNo());
@ -313,7 +332,7 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.error(500, "单据校验提交失败,请先录入业务单据!");
}
} else {
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
orderEntity.setStatus(ORDER_STATUS_CHECK_PROCESS);
ioAddInoutService.dealProcess(orderEntity);
checkInoutService.check(addOrderRequest.getBillNo());
return ResultVOUtils.success("提交成功!");
@ -323,6 +342,17 @@ public class IoOrderController extends BaseController {
}
public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) {
if (orderEntity.getStatus() == ORDER_STATUS_CHECK_PROCESS || orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESS
|| orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_PROCESSING) {
return ResultVOUtils.error(500, "提交失败,单据正在处理,请稍后刷新查看!");
}
if (orderEntity.getStatus() != 1 && orderEntity.getStatus() != 3 && orderEntity.getStatus() != 4 && orderEntity.getStatus() != 6) {
return ResultVOUtils.error(500, "提交失败,单据已提交,请稍后刷新查看!");
}
return null;
}
//带配货-立即提交
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/waitAllocate/submitOrderWeb")
@ -331,6 +361,10 @@ public class IoOrderController extends BaseController {
//校验单据是否已完成
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
BaseResponse tempResponse = checkSubmitEnable(orderEntity);
if (tempResponse != null)
return tempResponse;
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(addOrderRequest.getBillNo());
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(addOrderRequest.getBillNo());
@ -378,6 +412,10 @@ public class IoOrderController extends BaseController {
@PostMapping("udiwms/inout/order/delete")
@Log(title = "单据管理", businessType = BusinessType.DELETE)
public BaseResponse deletById(@RequestBody DeleteRequest deleteRequest) {
IoOrderEntity orderEntity = orderService.findByBillNo(deleteRequest.getBillNo());
if (orderEntity.getStatus() != 1 && orderEntity.getStatus() != 3 && orderEntity.getStatus() != 4 && orderEntity.getStatus() != 6) {
return ResultVOUtils.error(500, "单据已提交无法删除!");
}
orderService.deleteByBillNo(deleteRequest.getBillNo());
orderDetailBizService.deleteByOrderId(deleteRequest.getBillNo());
orderDetailCodeService.deleteByOrderId(deleteRequest.getBillNo());

@ -149,6 +149,7 @@ public class IoAddInoutService {
} else {
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
orderEntity.setUpdateTime(new Date());
orderEntity.setErrMsg(result);
orderService.update(orderEntity);
insertList.clear();
return;

@ -39,6 +39,8 @@ import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
import static com.glxp.api.constant.ConstantStatus.ORDER_STATUS_CHECK_PROCESS;
/**
*
*/
@ -121,6 +123,10 @@ public class IoCheckInoutService {
//过滤非未校验或校验异常
if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_CHECK && orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_CHECK_FAIL)
return;
orderEntity.setStatus(ORDER_STATUS_CHECK_PROCESS);
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
orderService.update(orderEntity);
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (!bussinessTypeEntity.isCheckEnable()) {
unCheckFirstFinish(orderEntity);

@ -634,7 +634,7 @@ public class IoOrderServiceImpl implements IoOrderService {
filterOrderRequest.setDealStatuses(Arrays.asList(2));
break;
case Constant.ORDER_STATUS_CHECKED_ERROR:
filterOrderRequest.setStatuses(Arrays.asList(6));
filterOrderRequest.setStatuses(Arrays.asList(6,4));
filterOrderRequest.setDealStatuses(Arrays.asList(2));
break;
case Constant.ORDER_STATUS_CHECK_SUCCESS:

@ -1351,6 +1351,7 @@ public class HeartService {
orderEntity.setUpdateTime(null);
orderEntity.setFromType(ConstantStatus.FROM_UDISP);
orderEntity.setProcessStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setOrderType(ConstantStatus.ORDER_TYPE_SCAN);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
if (syncDataBustypeEntity != null) {
if (syncDataBustypeEntity.getSyncStatus() != null && syncDataBustypeEntity.getSyncStatus().compareTo(1) == 0) {

@ -186,7 +186,9 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
thrProductsEntity = new ThrProductsEntity();
BeanUtil.copyProperties(item, thrProductsEntity);
thrProductsEntity.setCreateTime(new Date());
thrProductsEntity.setSpec(thrProductsEntity.getStandard());
if (StrUtil.isEmpty(item.getSpec())) {
thrProductsEntity.setSpec(item.getStandard());
}
thrProductsEntity.setUpdateTime(new Date());
thrProductsEntity.setId(IdUtil.getSnowflakeNextId());
thrProductsEntity.setThirdSysFk(thrSystemDetailEntity.getThirdSysFk());
@ -196,6 +198,9 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
if (isChange) {
BeanUtil.copyProperties(item, thrProductsEntity, new CopyOptions().setIgnoreNullValue(true));
thrProductsEntity.setUpdateTime(new Date());
if (StrUtil.isEmpty(thrProductsEntity.getSpec())) {
thrProductsEntity.setSpec(thrProductsEntity.getStandard());
}
thrProductsDao.updateEntityById(thrProductsEntity);
}
}
@ -232,7 +237,9 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
BeanUtil.copyProperties(item, thrProductsEntity);
thrProductsEntity.setCreateTime(new Date());
thrProductsEntity.setUpdateTime(new Date());
thrProductsEntity.setSpec(thrProductsEntity.getStandard());
if (StrUtil.isEmpty(item.getSpec())) {
thrProductsEntity.setSpec(item.getStandard());
}
thrProductsEntity.setId(IdUtil.getSnowflakeNextId());
thrProductsEntity.setThirdSysFk(filterThrProductsRequest.getThirdSys());
thrProductsDao.insertThrProducts(thrProductsEntity);
@ -241,6 +248,9 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
if (isChange) {
BeanUtil.copyProperties(item, thrProductsEntity, new CopyOptions().setIgnoreNullValue(true));
thrProductsEntity.setUpdateTime(new Date());
if (StrUtil.isEmpty(thrProductsEntity.getSpec())) {
thrProductsEntity.setSpec(thrProductsEntity.getStandard());
}
thrProductsDao.updateEntityById(thrProductsEntity);
}
}
@ -272,7 +282,10 @@ public class ThrProductsServiceImpl extends ServiceImpl<ThrProductsDao, ThrProdu
//将关键字段的值设置为新数据的值
thrProductsEntity.setName(thrProductsResponse.getName());
thrProductsEntity.setMeasname(thrProductsResponse.getMeasname());
thrProductsEntity.setSpec(thrProductsResponse.getSpec());
if (StrUtil.isEmpty(thrProductsResponse.getSpec())) {
thrProductsEntity.setSpec(thrProductsResponse.getStandard());
}
thrProductsEntity.setRegisterNo(thrProductsResponse.getRegisterNo());
thrProductsEntity.setManufactory(thrProductsResponse.getManufactory());
thrProductsEntity.setCplb(thrProductsResponse.getCplb());

Loading…
Cancel
Save