Merge remote-tracking branch 'origin/master'

master
chengqf 2 years ago
commit 7053465cb9

@ -169,6 +169,28 @@ public class AuthAdminController {
}
@AuthRuleAnnotation("admin/auth/admin/customerRoles")
@GetMapping("/admin/auth/admin/customerRolesList")
public BaseResponse customerRolesList(@RequestParam(value = "page", defaultValue = "1") Integer page,
@RequestParam(value = "limit", defaultValue = "100") Integer limit) {
List<AuthRole> authRoleList = authRoleService.listCustomerRoles(page, limit, 1);
// List<AuthRole> authRoleList = authRoleService.listAuthRoles2(page, limit);
PageInfo<AuthRole> pageInfo = new PageInfo<>(authRoleList);
PageSimpleResponse<AuthAdminRoleResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
List<AuthAdminRoleResponse> authAdminRoleResponses = authRoleList.stream().map(e -> {
AuthAdminRoleResponse authAdminRoleResponse = new AuthAdminRoleResponse();
BeanUtils.copyProperties(e, authAdminRoleResponse);
return authAdminRoleResponse;
}).collect(Collectors.toList());
pageSimpleResponse.setList(authAdminRoleResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
/**
*
*

@ -159,7 +159,7 @@ public class IoOrderDetailBizController extends BaseController {
// todo 查询产品是否已经通过认证
if (isVailCert && udiRelevanceResponse.isNeedCert()) {
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory());
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),"");
if (supProductEntity != null && (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS)) {
} else {

@ -267,12 +267,16 @@ public class SupCertController {
SupCertEntity supCertEntity = new SupCertEntity();
BeanUtils.copyProperties(postSupCertRequest, supCertEntity);
if(postSupCertRequest.getVailDate().getTime()>postSupCertRequest.getExpireDate().getTime()){
return ResultVOUtils.error(999,"生效期不能小于失效期!");
if(postSupCertRequest.getVailDate() !=null && postSupCertRequest.getExpireDate() != null){
if(postSupCertRequest.getVailDate().getTime()>postSupCertRequest.getExpireDate().getTime()){
return ResultVOUtils.error(999,"生效期不能小于失效期!");
}
}
if (postSupCertRequest.getRepeatUpload() == 1) {
//已审核的重新提交
//1.修改对应的资质信息进入变更审核状态,

@ -154,27 +154,29 @@ public class SupProductController {
public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk()));
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory());
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),selectProductBindRequest.getManufacturerId());
if (supProductEntity != null) {
return ResultVOUtils.error(500, "资质证书已存在,请勿重复添加!");
return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!");
}else{
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
}
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
return ResultVOUtils.success(supProductEntity);
// boolean b = supProductService.insertRegistration(supProductEntity);

@ -11,4 +11,5 @@ public class SelectProductBindRequest {
private String customerId;
private Integer auditStatus;
private String companyName;
private String manufacturerIdFk;
}

@ -99,7 +99,7 @@ public class AuthRoleServiceImpl implements AuthRoleService {
limit = limit != null && limit > 0 && limit < 100 ? limit : 100;
int offset = (page - 1) * limit;
PageHelper.offsetPage(offset, limit);
List<AuthRole> list = authRoleDao.getCustomerRoles(isCustomer);
List<AuthRole> list = authRoleDao.listCustomerRoles(isCustomer);
return list;
}

@ -138,6 +138,12 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public List<IoOrderInvoiceResponse> filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest) {
if (null == orderDetailBizRequest) {
return Collections.emptyList();
}
if (null != orderDetailBizRequest.getPage() && null != orderDetailBizRequest.getLimit()) {
PageHelper.offsetPage((orderDetailBizRequest.getPage() - 1) * orderDetailBizRequest.getLimit(), orderDetailBizRequest.getLimit());
}
return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest);
}

@ -140,6 +140,20 @@ public class InvRemindSetServiceImpl implements InvRemindSetService {
public BaseResponse getInfoByInvId(Integer invId) {
InvRemindSetResponse response = invRemindSetDao.selectInfoByInvId(invId);
if (null != response) {
//查询是否已有库存预警设置信息,若已存在预警设置,则回显旧数据
InvRemindSetEntity invRemindSetEntity = invRemindSetDao.selectOne(new QueryWrapper<InvRemindSetEntity>()
.eq("deptCode", response.getDeptCode())
.eq("invCode", response.getInvCode())
.eq("relId", response.getRelId())
);
if (null != invRemindSetEntity) {
response.setLackStock(invRemindSetEntity.getLackStock());
response.setLowStock(invRemindSetEntity.getLowStock());
response.setOverStock(invRemindSetEntity.getOverStock());
response.setExpireDate(invRemindSetEntity.getExpireDate());
response.setRecentDate(invRemindSetEntity.getRecentDate());
}
if (response.getIsDateBy() == 1 && null != response.getRecentDateTime()) {
//将近效期预警值由小时换算成天
response.setRecentDateTime(response.getRecentDateTime() / 24);

@ -17,7 +17,7 @@ public interface SupProductService {
SupProductEntity findByRelIdFk(String relIdFk);
SupProductEntity findByManufactury(String cpmctymc, String manufactory);
SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk);
SupProductResponse findByPassByReCert(String registerCert);

@ -82,10 +82,20 @@ public class SupProductServiceImpl implements SupProductService {
}
@Override
public SupProductEntity findByManufactury(String cpmctymc, String manufactory) {
List<SupProductEntity> supProductEntities = supProductDao.selectList(new QueryWrapper<SupProductEntity>().eq("manufactory", manufactory)
.eq("recordProductName", cpmctymc)
.last("LIMIT 1"));
public SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk) {
QueryWrapper<SupProductEntity> ew=new QueryWrapper<>();
if(StrUtil.isNotEmpty(manufactory)){
ew.eq("manufactory",manufactory);
}
if(StrUtil.isNotEmpty(cpmctymc)){
ew.eq("recordProductName",cpmctymc);
}
if(StrUtil.isNotEmpty(manufacturerIdFk)){
ew.eq("manufacturerIdFk",manufacturerIdFk);
}
ew.last("limit 1");
List<SupProductEntity> supProductEntities = supProductDao.selectList(ew);
if (CollUtil.isNotEmpty(supProductEntities))
return supProductEntities.get(0);
else return null;

Loading…
Cancel
Save