|
|
|
@ -18,6 +18,7 @@ import com.glxp.api.entity.basic.UdiEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.UdiProductEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.*;
|
|
|
|
|
import com.glxp.api.entity.inv.InvPreinDetailEntity;
|
|
|
|
|
import com.glxp.api.entity.purchase.SupProductEntity;
|
|
|
|
|
import com.glxp.api.entity.system.SystemParamConfigEntity;
|
|
|
|
|
import com.glxp.api.http.SpsDirectClient;
|
|
|
|
|
import com.glxp.api.req.basic.CompanyProductRelevanceRequest;
|
|
|
|
@ -36,6 +37,7 @@ import com.glxp.api.service.basic.*;
|
|
|
|
|
import com.glxp.api.service.inout.*;
|
|
|
|
|
import com.glxp.api.service.inv.InvPreinDetailService;
|
|
|
|
|
import com.glxp.api.service.inv.InvProductDetailService;
|
|
|
|
|
import com.glxp.api.service.purchase.SupProductService;
|
|
|
|
|
import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.util.CustomUtil;
|
|
|
|
|
import com.glxp.api.util.DateUtil;
|
|
|
|
@ -329,6 +331,8 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
IoCodeLostService codeLostService;
|
|
|
|
|
@Resource
|
|
|
|
|
SupProductService supProductService;
|
|
|
|
|
|
|
|
|
|
//前端扫码提交
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
@ -418,8 +422,9 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//过期提醒:
|
|
|
|
|
SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip");
|
|
|
|
|
if (expireParamConfigEntity.getParamValue().equals("1") && !addOrderRequest.isIgnoreExpire()) {
|
|
|
|
|
// SystemParamConfigEntity expireParamConfigEntity = systemParamConfigService.selectByParamKey("expire_date_tip");
|
|
|
|
|
|
|
|
|
|
if (bussinessTypeEntity.isCheckExpire() && !addOrderRequest.isIgnoreExpire()) {
|
|
|
|
|
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
|
|
|
|
|
String expireDate = "20" + udiEntity.getExpireDate();
|
|
|
|
|
long expireTime = DateUtil.parseDateExpire(expireDate);
|
|
|
|
@ -432,7 +437,7 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
//失效期提醒
|
|
|
|
|
SystemParamConfigEntity recentParamConfigEntity = systemParamConfigService.selectByParamKey("recent_date_tip");
|
|
|
|
|
long recent = Long.parseLong(recentParamConfigEntity.getParamValue());
|
|
|
|
|
if (recent > 0 && !addOrderRequest.isIgnoreRecentExpire()) {
|
|
|
|
|
if (bussinessTypeEntity.isCheckVailDate() && recent > 0 && !addOrderRequest.isIgnoreRecentExpire()) {
|
|
|
|
|
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
|
|
|
|
|
String expireDate = "20" + udiEntity.getExpireDate();
|
|
|
|
|
long expireTime = DateUtil.parseDateExpire(expireDate);
|
|
|
|
@ -448,6 +453,7 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验预验收是否已存在
|
|
|
|
|
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
|
|
|
|
|
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
|
|
|
|
@ -651,6 +657,17 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BaseResponse baseResponse = checkRelId(codeEnttity, unitFk);
|
|
|
|
|
|
|
|
|
|
//判断证书是否过期
|
|
|
|
|
// if (codeEnttity.getRelId() != null && bussinessTypeEntity.isCheckCertExpire()) {
|
|
|
|
|
//
|
|
|
|
|
// SupProductEntity supProductEntity = supProductService.findByRelIdFk(codeEnttity.getRelId() + "");
|
|
|
|
|
// if(supProductEntity!=null){
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// if (DateUtil.)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
BaseResponse invRes = checkInv(bussinessTypeEntity, codeEnttity);
|
|
|
|
|
if (invRes != null) {
|
|
|
|
|
return invRes;
|
|
|
|
|