资质证书预警等相关修改

dev_test1.0
anthonywj 1 year ago
parent 479705f562
commit bdd9306804

@ -137,13 +137,13 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
wrapper.eq("status", 0).eq("auditStatus", ConstantStatus.AUDIT_PASS).lt("expireDate", new Date()).eq("type", type);
switch (type) {
case 1: //查询供应商ID
wrapper.select("CustomerId", "code", "vailDate", "expireDate");
wrapper.select("CustomerId", "code", "vailDate", "expireDate", "type");
break;
case 2: //查询生产企业ID
wrapper.select("manufacturerIdFk", "code", "vailDate", "expireDate");
wrapper.select("manufacturerIdFk", "code", "vailDate", "expireDate", "type");
break;
case 3: //查询产品ID
wrapper.select("productIdFk", "code", "vailDate", "expireDate");
wrapper.select("productIdFk", "code", "vailDate", "expireDate", "type");
break;
default:
break;

@ -19,6 +19,7 @@ import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupCompanyService;
import com.glxp.api.service.purchase.SupManufacturerService;
import com.glxp.api.service.purchase.SupProductService;
import com.glxp.api.util.IntUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;
@ -208,17 +209,17 @@ public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> i
supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date());
boolean b = supCertDao.updateCompanyCert(supCertEntity);
if (supCertEntity.getType() == ConstantStatus.CERT_COMPANY) {
if (IntUtil.value(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) {
} else if (IntUtil.value(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) {
} else if (IntUtil.value(supCertEntity.getType()) == ConstantStatus.CERT_PRODUCT) {
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
SupProductEntity supProductEntity = new SupProductEntity();
supProductEntity.setId(supProductResponse.getId());

@ -29,6 +29,7 @@
AND bc.name like concat('%', #{certName}, '%')
</if>
</where>
group by m.id
order by m.updateTime desc
</select>
@ -36,8 +37,8 @@
select m.*,
c.companyName `name`,
(select `name` from sup_cert s where s.code = m.code and s.manufacturerIdFk = m.idFk limit 1) certName
,
(select name from basic_corp where erpId = c.customerId) supName
,
(select name from basic_corp where erpId = c.customerId) supName
from sup_cert_remind_msg m
left join sup_manufacturer c on m.idFk = c.manufacturerId
left join sup_cert bc on bc.code = m.code
@ -61,6 +62,7 @@
AND bc.name like concat('%', #{certName}, '%')
</if>
</where>
group by m.id
order by m.updateTime desc
</select>
@ -96,6 +98,7 @@
AND bc.name like concat('%', #{certName}, '%')
</if>
</where>
group by m.id
order by m.updateTime desc
</select>
</mapper>

Loading…
Cancel
Save