资质证书撤回功能

master
anthonywj 2 years ago
parent 8769aa038c
commit 5eb2f39073

@ -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;

@ -31,6 +31,7 @@ import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.auth.InvWarehouseService;
import com.glxp.api.service.basic.*;
import com.glxp.api.service.inout.*;
import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupProductService;
import com.glxp.api.service.system.SystemParamConfigService;
import com.glxp.api.service.thrsys.ThrOrderDetailService;
@ -98,6 +99,8 @@ public class IoOrderDetailBizController extends BaseController {
SupProductService supProductService;
@Resource
SystemParamConfigService systemParamConfigService;
@Resource
SupCertService supCertService;
//录入业务单据详情
@AuthRuleAnnotation("")

@ -167,6 +167,37 @@ public class SupCertController {
return ResultVOUtils.success("成功");
}
//撤回单据
@AuthRuleAnnotation("")
@PostMapping("/sale/sup/cert/revoke")
public BaseResponse revokeSupCert(@RequestBody SupCertEntity supCertEntity) {
supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date());
boolean b = supCertService.updateCompanyCert(supCertEntity);
if (supCertEntity.getType() == ConstantStatus.CERT_COMPANY) {
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId());
supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supCompanyEntity.setUpdateTime(new Date());
supCompanyService.modifyCompany(supCompanyEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_MANUFACTURER) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk());
supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supManufacturerEntity.setUpdateTime(new Date());
supManufacturerService.modifyCompany(supManufacturerEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_PRODUCT) {
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
SupProductEntity supProductEntity = new SupProductEntity();
supProductEntity.setId(supProductResponse.getId());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supProductService.modifyRegistration(supProductEntity);
}
return ResultVOUtils.success("成功");
}
@Resource
SupCompanyService supCompanyService;
@Resource
@ -486,10 +517,10 @@ public class SupCertController {
//首营预览文件
@PostMapping("/udiwms/image/register/file")
public BaseResponse uploadRegisterFile(@RequestBody FilterImageRequest filterImageRequest) {
List<String> list=new ArrayList<>();
String url=filterImageRequest.getCertFileUrl()+filterImageRequest.getImageUrl();
list.add(url);
return ResultVOUtils.success(url);
List<String> list = new ArrayList<>();
String url = filterImageRequest.getCertFileUrl() + filterImageRequest.getImageUrl();
list.add(url);
return ResultVOUtils.success(url);
}

@ -70,7 +70,10 @@ public class SupProductServiceImpl implements SupProductService {
@Override
public SupProductEntity findByRelIdFk(String relIdFk) {
List<SupProductEntity> supProductEntities = supProductDao.selectList(new QueryWrapper<SupProductEntity>().eq("relIdFk", relIdFk).last("LIMIT 1"));
List<SupProductEntity> supProductEntities = supProductDao.selectList(new QueryWrapper<SupProductEntity>().eq("relIdFk", relIdFk)
.and(tmp -> tmp.eq("auditStatus", ConstantStatus.AUDIT_PASS).or().eq("auditStatus", ConstantStatus.AUDIT_PASS))
.last("LIMIT 1"));
if (CollUtil.isNotEmpty(supProductEntities))
return supProductEntities.get(0);
else return null;

Loading…
Cancel
Save