代码备份,bug修复

master
anthonyywj2 3 years ago
parent 3f55145f51
commit 5c9b67d39e

@ -88,6 +88,7 @@ public class ConstantStatus {
public static final int FROM_PC = 5; //pc端扫码精灵
public static final int FROM_CHANGE = 6; //单据流转
public static final int FROM_UDISP = 7; //udi供应商平台
public static final int FROM_PEACE_CHANGE = 8; //平衡补单
//DI类型

@ -97,6 +97,19 @@ public class BussinessChangeTypeController {
return ResultVOUtils.success(bussinessTypeEntities);
}
@AuthRuleAnnotation("")
@PostMapping("/spms/bussinessChangeType/remove")
public BaseResponse removeBussinessType(@RequestBody BussinessChangeTypeEntity deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
String action = deleteRequest.getScAction();
bussinessChangeTypeService.deleteByAction(action);
return ResultVOUtils.success("删除成功");
}
@AuthRuleAnnotation("")
@PostMapping("/spms/bussinessChangeType/delete")
public BaseResponse deleteBussinessType(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {

@ -445,8 +445,13 @@ public class OrderController {
}
StockOrderEntity stockOrderEntity = stockOrderService.findByBillNo(billNo);
if(StrUtil.isEmpty(stockOrderEntity.getSupplementNo())){
return orderService.supplementOrder(stockOrderEntity.getBillNo(), stockOrderEntity.getOrderIdFk());
}else {
return ResultVOUtils.error(500,"当前单据已补单,请勿重复补单");
}
return orderService.supplementOrder(stockOrderEntity.getBillNo(), stockOrderEntity.getOrderIdFk());
}

@ -193,6 +193,10 @@ public class CheckOrderUtils {
if (bussinessTypeEntity.isSecCheckChange()) {
return ConstantStatus.SORDER_CHECKED;
}
}else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (bussinessTypeEntity.isSecCheckBalacne()) {
return ConstantStatus.SORDER_CHECKED;
}
}
} else {
return ConstantStatus.SORDER_DELIVER;

@ -7,6 +7,7 @@ import com.glxp.sale.admin.constant.ConstantType;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.sale.admin.entity.inventory.InvProductEntity;
import com.glxp.sale.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.sale.admin.req.inout.DeleteRequest;
import com.glxp.sale.admin.req.inventory.FilterInvProductDetailRequest;
import com.glxp.sale.admin.req.inventory.FilterInvProductRequest;
@ -18,6 +19,7 @@ import com.glxp.sale.admin.res.inventory.InvProductStatResponse;
import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.service.inventory.InvPreProductDetailService;
import com.glxp.sale.admin.service.inventory.InvPreProductService;
import com.glxp.sale.admin.service.inventory.InvWarehouseService;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
import com.glxp.sale.common.util.ResultVOUtils;
@ -42,6 +44,8 @@ public class InvPreProductsController {
InvPreProductDetailService invProductDetailService;
@Resource
private CompanyService companyService;
@Resource
private InvWarehouseService invWarehouseService;
@AuthRuleAnnotation("")
@GetMapping("spms/pre/inv/products/filter")
@ -53,6 +57,7 @@ public class InvPreProductsController {
} else {
CompanyEntity companyEntity = companyService.findCompany(Long.parseLong(filterInvProductRequest.getCustomerId()));
filterInvProductRequest.setSupId(companyEntity.getUnitIdFk());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findDefault(true, true);
filterInvProductRequest.setCustomerId(null);
}
List<InvProductResponse> invProductResponses = invProductService.filterJoinInvProduct(filterInvProductRequest);

@ -10,6 +10,7 @@ import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.entity.inout.OrderEntity;
import com.glxp.sale.admin.entity.inventory.InvProductDetailEntity;
import com.glxp.sale.admin.entity.inventory.InvProductEntity;
import com.glxp.sale.admin.entity.inventory.InvWarehouseEntity;
import com.glxp.sale.admin.entity.udid.UdiEntity;
import com.glxp.sale.admin.req.info.DeleteRequest;
import com.glxp.sale.admin.req.inventory.FilterCodeTraceRequest;
@ -27,6 +28,7 @@ import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.service.inout.OrderService;
import com.glxp.sale.admin.service.inventory.InvProductDetailService;
import com.glxp.sale.admin.service.inventory.InvProductService;
import com.glxp.sale.admin.service.inventory.InvWarehouseService;
import com.glxp.sale.admin.util.FilterUdiUtils;
import com.glxp.sale.common.enums.ResultEnum;
import com.glxp.sale.common.res.BaseResponse;
@ -61,6 +63,8 @@ public class InvProductsController {
private UdiInfoService udiInfoService;
@Resource
private CompanyService companyService;
@Resource
private InvWarehouseService invWarehouseService;
@AuthRuleAnnotation("")
@GetMapping("spms/inv/products/filter")
@ -72,6 +76,8 @@ public class InvProductsController {
} else {
CompanyEntity companyEntity = companyService.findCompany(Long.parseLong(filterInvProductRequest.getCustomerId()));
filterInvProductRequest.setSupId(companyEntity.getUnitIdFk());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findDefault(false, true);
filterInvProductRequest.setInvStorageCode(invWarehouseEntity.getCode());
filterInvProductRequest.setCustomerId(null);
}
// filterInvProductRequest.setGroupType("invStorageCode");

@ -99,7 +99,10 @@ public class SystemParamConfigController {
//出入库新增单据校验
if (systemParamConfigSaveRequest.getParamKey().equals("io_transInout_interval")) {
try {
int time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue());
int time = 5;
if (!"0".equals(systemParamConfigSaveRequest.getParamValue())) {
time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue());
}
String cronStr = CronUtils.parseMinuteIntervel(time);
ScheduledEntity scheduledEntity = new ScheduledEntity();
scheduledEntity.setCron(cronStr);
@ -110,7 +113,10 @@ public class SystemParamConfigController {
}
} else if (systemParamConfigSaveRequest.getParamKey().equals("io_erpcheck_interval")) {
try {
int time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue());
int time = 5;
if (!"0".equals(systemParamConfigSaveRequest.getParamValue())) {
time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue());
}
String cronStr = CronUtils.parseMinuteIntervel(time);
ScheduledEntity scheduledEntity = new ScheduledEntity();
scheduledEntity.setCron(cronStr);
@ -121,11 +127,10 @@ public class SystemParamConfigController {
}
} else if (systemParamConfigSaveRequest.getParamKey().equals("supplement_order_interval")) {
try {
int time = 1;
int time = 5;
if (!"0".equals(systemParamConfigSaveRequest.getParamValue())) {
time = Integer.parseInt(systemParamConfigSaveRequest.getParamValue());
}
String cornStr = CronUtils.parseMinuteIntervel(time);
ScheduledEntity scheduledEntity = new ScheduledEntity();
scheduledEntity.setCron(cornStr);

@ -19,4 +19,7 @@ public interface BussinessChangeTypeDao {
boolean insertBusChangeTypee(BussinessChangeTypeEntity bussinessTypeEntity);
boolean deleteById(@Param("id") String id);
boolean deleteByAction(@Param("scAction") String scAction);
}

@ -28,6 +28,7 @@ public class BussinessTypeEntity {
private boolean checkWebNew;
private boolean checkChange;
private boolean secCheckUdims;
private boolean secCheckPdaEd;
private boolean secCheckPdaUn;
@ -35,6 +36,9 @@ public class BussinessTypeEntity {
private boolean secCheckWebNew;
private boolean secCheckChange;
private boolean checkBalacne;
private boolean secCheckBalacne;
private int corpType;
private String storageCode;

@ -50,6 +50,7 @@ public class FilterUdiInfoRequest extends ListPageRequest {
private String sptm;
private String unionFilterStr;//产品名称,规格,批文,生产厂家联合查询
private Boolean isDisable;
}

@ -47,4 +47,8 @@ public class BussinessTypResponse {
//启用默认补单
private boolean enableSupplementOrder;
private boolean checkBalacne;
private boolean secCheckBalacne;
}

@ -19,4 +19,5 @@ public interface BussinessChangeTypeService {
boolean deleteById(String id);
boolean deleteByAction(String scAction);
}

@ -50,4 +50,9 @@ public class BussinessChangeTypeServiceaImpl implements BussinessChangeTypeServi
public boolean deleteById(String id) {
return bussinessChangeTypeDao.deleteById(id);
}
@Override
public boolean deleteByAction(String scAction) {
return bussinessChangeTypeDao.deleteByAction(scAction);
}
}

@ -214,7 +214,7 @@ public class OrderServiceImpl implements OrderService {
supplementOrder.setLocStorageCode(order.getFromCorpId());
String name = invWarehouseDao.getNameByCode(supplementOrder.getFromCorpId());
supplementOrder.setFromCorp(name);
supplementOrder.setFromType(ConstantStatus.FROM_CHANGE);
supplementOrder.setFromType(ConstantStatus.FROM_PEACE_CHANGE);
BussinessTypeEntity supplementType = bussinessTypeDao.selectByAction(bussinessTypeEntity.getSupplementOrderType());
supplementOrder.setMainAction(supplementType.getMainAction());

@ -41,5 +41,6 @@ public class IoErpCheckTask implements SchedulingConfigurer {
private void process() {
logger.info("定时校验ERP单---暂停");
// ioTransInoutService.checkOrder();
}
}

@ -370,8 +370,8 @@ public class IoTransInoutService {
//近效期提醒:
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("recent_date_tip");
int recent = Integer.parseInt(systemParamConfigEntity.getParamValue());
SystemParamConfigEntity recentParamConfigEntity = systemParamConfigService.selectByParamKey("recent_date_tip");
int recent = Integer.parseInt(recentParamConfigEntity.getParamValue());
if (recent > 0) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
if (udiEntity.getExpireDate() != null) {
@ -386,7 +386,19 @@ public class IoTransInoutService {
}
//过期提醒:
SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip");
if (!"0".equals(expireParamConfigEntity.getParamValue())) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(warehouseEntity.getCode());
if (udiEntity.getExpireDate() != null) {
String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = DateUtil.parseDateExpire(expireDate);
if (expireTime - System.currentTimeMillis() < 0) {
orderService.updateOrderStatus(warehouseEntity.getOrderId(), ConstantStatus.ORDER_STATUS_FAIL);
orderService.updateRemark(orderEntity.getId(), "udi码" + warehouseEntity.getCode() + "已经过期!");
return;
}
}
}
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.selectAllByNameCode(warehouseEntity.getNameCode());
if (udiRelevanceResponses.size() == 1) {
@ -522,6 +534,11 @@ public class IoTransInoutService {
unCheckFinish(orderEntity, warehouseEntityList);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (!bussinessTypeEntity.isCheckBalacne()) {
unCheckFinish(orderEntity, warehouseEntityList);
return;
}
}
genOrderDetail(warehouseEntityList);
checkMutiDi(orderEntity.getId(), bussinessTypeEntity); //校验一个DI是否绑定多个产品ID

@ -2,8 +2,10 @@ package com.glxp.sale.admin.thread;
import com.glxp.sale.admin.dao.info.ScheduledDao;
import com.glxp.sale.admin.entity.info.ScheduledEntity;
import com.glxp.sale.admin.entity.param.SystemParamConfigEntity;
import com.glxp.sale.admin.httpclient.UdiDlHttpClient;
import com.glxp.sale.admin.req.udid.ScheduledRequest;
import com.glxp.sale.admin.service.param.SystemParamConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.EnableScheduling;
@ -24,6 +26,8 @@ public class IoTransInoutTask implements SchedulingConfigurer {
protected ScheduledDao scheduledDao;
@Resource
private IoTransInoutService ioTransInoutService;
@Resource
SystemParamConfigService systemParamConfigService;
@Override
public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
@ -42,7 +46,11 @@ public class IoTransInoutTask implements SchedulingConfigurer {
private void process() {
logger.info("定时重码校验");
ioTransInoutService.transInout();
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("io_transInout_interval");
if (!"0".equals(systemParamConfigEntity.getParamValue())) {
logger.info("定时重码校验");
ioTransInoutService.transInout();
}
}
}

@ -47,6 +47,13 @@
</delete>
<delete id="deleteByAction" parameterType="Map">
DELETE
FROM basic_bustype_pre
WHERE scAction = #{scAction}
</delete>
<select id="selectById" parameterType="Map" resultType="com.glxp.sale.admin.entity.basic.BussinessChangeTypeEntity">
select *
FROM basic_bustype_pre

@ -15,7 +15,8 @@
basic_bussiness_type.secCheckWebNew, basic_bussiness_type.secCheckChange,
basic_bustype_local.name localName,basic_bussiness_type.checkEnable, basic_bustype_local.advanceType,
basic_bustype_local.changeEnable,basic_bussiness_type.genUnit,basic_bussiness_type.innerOrder,
basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode
basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne,
basic_bussiness_type.secCheckBalacne
FROM basic_bussiness_type LEFT JOIN basic_bustype_local
on basic_bussiness_type.localAction = basic_bustype_local.action
<where>
@ -90,7 +91,8 @@
basic_bussiness_type.secCheckWebNew, basic_bussiness_type.secCheckChange,
basic_bustype_local.name localName,basic_bussiness_type.checkEnable, basic_bustype_local.advanceType,
basic_bustype_local.changeEnable,basic_bussiness_type.genUnit,basic_bussiness_type.innerOrder,
basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode
basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne,
basic_bussiness_type.secCheckBalacne
FROM basic_bussiness_type LEFT JOIN basic_bustype_local
on basic_bussiness_type.localAction = basic_bustype_local.action
INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action
@ -127,7 +129,7 @@
checkEnable,genUnit,innerOrder,secCheckEnable,
checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,
secCheckChange,corpType,basic_bussiness_type.storageCode)
secCheckChange,corpType,basic_bussiness_type.storageCode,checkBalacne,secCheckBalacne)
values
(
#{action},
@ -154,7 +156,7 @@
#{secCheckWebNew},
#{secCheckChange},
#{corpType},
#{storageCode}
#{storageCode},#{checkBalacne},#{secCheckBalacne}
)
</insert>
@ -167,7 +169,7 @@
(`index`,action,name,enable,remark,mainAction,localAction,thirdSysFk,
checkEnable,genUnit,innerOrder,secCheckEnable,
checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,secCheckChange,corpType,storageCode)
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne)
values
(
#{index},
@ -195,7 +197,7 @@
#{secCheckWebNew},
#{secCheckChange},
#{corpType},
#{storageCode}
#{storageCode},#{checkBalacne},#{secCheckBalacnesecCheckBalacne}
)
</insert>
@ -225,6 +227,8 @@
<if test="secCheckPc != null">secCheckPc=#{secCheckPc},</if>
<if test="secCheckWebNew != null">secCheckWebNew=#{secCheckWebNew},</if>
<if test="secCheckChange != null">secCheckChange=#{secCheckChange},</if>
<if test="checkBalacne != null">checkBalacne=#{checkBalacne},</if>
<if test="secCheckBalacne != null">secCheckBalacne=#{secCheckBalacne},</if>
<if test="index != null">index=#{index},</if>
<if test="corpType != null">corpType=#{corpType},</if>
<if test="storageCode != null">storageCode=#{storageCode},</if>

@ -50,7 +50,6 @@
<if test="udplatCode != '' and udplatCode != null">
AND basic_udirel.udplatCode = #{udplatCode}
</if>
<if test=" diType != null">
AND basic_products.diType= #{diType}
</if>
@ -119,6 +118,10 @@
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode},'%')
</if>
<if test="isDisable == false">
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false )
</if>
<if test="unionCode != '' and unionCode != null">
and (
nameCode LIKE concat('%',#{unionCode},'%')

@ -32,3 +32,12 @@ scbssfbhsxrq VARCHAR(10) NULL DEFAULT NULL COMMENT '是否包含失效日期'
);
alter table basic_bussiness_type add
(
checkBalacne TINYINT NULL DEFAULT NULL COMMENT '平衡补单是否校验',
secCheckBalacne TINYINT NULL DEFAULT NULL COMMENT '平衡不但是否二次验收'
);

Loading…
Cancel
Save