供应商账号不统一问题

master
anthonywj 2 years ago
parent 99c6b942db
commit a3a8614942

@ -972,6 +972,8 @@ public class IoCodeTempController extends BaseController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("warehouse/inout/saveTempCode") @PostMapping("warehouse/inout/saveTempCode")
public BaseResponse saveCode(@RequestBody IoCodeTempEntity codeTempEntity) { public BaseResponse saveCode(@RequestBody IoCodeTempEntity codeTempEntity) {
if (codeTempEntity.getCount() == null)
codeTempEntity.setCount(1);
if (StrUtil.isNotEmpty(codeTempEntity.getSerialNo()) && codeTempEntity.getSerialNo().length() > 20) { if (StrUtil.isNotEmpty(codeTempEntity.getSerialNo()) && codeTempEntity.getSerialNo().length() > 20) {
return ResultVOUtils.error(500, "无效条码!序列号超出最大范围"); return ResultVOUtils.error(500, "无效条码!序列号超出最大范围");
@ -997,6 +999,9 @@ public class IoCodeTempController extends BaseController {
return ResultVOUtils.error(500, "数量不能小于0"); return ResultVOUtils.error(500, "数量不能小于0");
} }
codeTempEntity.setReCount(codeTempEntity.getMyCount() * udiCalCountUtil.getActCount(codeTempEntity.getNameCode())); codeTempEntity.setReCount(codeTempEntity.getMyCount() * udiCalCountUtil.getActCount(codeTempEntity.getNameCode()));
if(codeTempEntity.getId() == null){
}
int b = codeTempService.updateById(codeTempEntity); int b = codeTempService.updateById(codeTempEntity);
if (b > 0) if (b > 0)
return ResultVOUtils.success("修改成功"); return ResultVOUtils.success("修改成功");

@ -74,8 +74,6 @@ public class SupCompanyController {
AuthRoleAdminService authRoleAdminService; AuthRoleAdminService authRoleAdminService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/api/pur/getSupComapnys") @GetMapping("/api/pur/getSupComapnys")
public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) { public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) {
@ -94,10 +92,11 @@ public class SupCompanyController {
//判断是不是存在草稿 //判断是不是存在草稿
if(companyEntity.getAuditStatus()==6){ if (companyEntity.getAuditStatus() == 6) {
List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); for(SupCertEntity obj:supCertEntityList){ List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId());
if(obj.getAuditStatus()==0){ for (SupCertEntity obj : supCertEntityList) {
return ResultVOUtils.error(999,"证书中存在草稿不允许提交!"); if (obj.getAuditStatus() == 0) {
return ResultVOUtils.error(999, "证书中存在草稿不允许提交!");
} }
} }
@ -143,7 +142,7 @@ public class SupCompanyController {
customerContactEntity.setCustomerId(customerId); customerContactEntity.setCustomerId(customerId);
customerContactService.insertCustomerContact(customerContactEntity); customerContactService.insertCustomerContact(customerContactEntity);
//更新相关证书对应的customerId //更新相关证书对应的customerId
supCertService.updateCustomerId(companyEntity.getCustomerId(), customerId,ConstantStatus.AUDIT_UN); supCertService.updateCustomerId(companyEntity.getCustomerId(), customerId, ConstantStatus.AUDIT_UN);
companyEntity.setCustomerId(customerId); companyEntity.setCustomerId(customerId);
companyEntity.setCreateTime(new Date()); companyEntity.setCreateTime(new Date());
@ -162,9 +161,9 @@ public class SupCompanyController {
//判断是不是存在草稿 //判断是不是存在草稿
List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId());
for(SupCertEntity obj:supCertEntityList){ for (SupCertEntity obj : supCertEntityList) {
if(obj.getAuditStatus()==0){ if (obj.getAuditStatus() == 0) {
return ResultVOUtils.error(999,"证书中存在草稿不允许提交!"); return ResultVOUtils.error(999, "证书中存在草稿不允许提交!");
} }
} }
@ -218,7 +217,7 @@ public class SupCompanyController {
public BaseResponse auditCompany(@RequestBody SupCompanyEntity companyEntity) { public BaseResponse auditCompany(@RequestBody SupCompanyEntity companyEntity) {
if(companyEntity.getAuditStatus()==1){ if (companyEntity.getAuditStatus() == 1) {
//查询用户上传的证书 //查询用户上传的证书
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest(); FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
filterSupCertRequest.setCustomerId(companyEntity.getCustomerId()); filterSupCertRequest.setCustomerId(companyEntity.getCustomerId());
@ -252,7 +251,7 @@ public class SupCompanyController {
return ResultVOUtils.error(500, "必传证书不齐全!"); return ResultVOUtils.error(500, "必传证书不齐全!");
} }
} }
String msg=""; String msg = "";
//查询是否包含审核未通过的证书 //查询是否包含审核未通过的证书
if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS
|| companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { || companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) {
@ -263,22 +262,24 @@ public class SupCompanyController {
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
if (CollUtil.isNotEmpty(supCertEntityList)) { if (CollUtil.isNotEmpty(supCertEntityList)) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
msg+=supCertEntity.getName()+","; msg += supCertEntity.getName() + ",";
} }
return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0,msg.length()-1) + ")"); return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")");
} }
} }
//修改用户角色 //修改用户角色
if(companyEntity.getRoleId()!=null){ if (companyEntity.getRoleId() != null) {
CustomerInfoEntity customerInfoEntity=new CustomerInfoEntity(); CustomerInfoEntity customerInfoEntity = new CustomerInfoEntity();
customerInfoEntity.setCustomerId(Long.valueOf(companyEntity.getCustomerId())); customerInfoEntity.setCustomerId(Long.valueOf(companyEntity.getCustomerId()));
customerInfoEntity.setRoleId(companyEntity.getRoleId()); customerInfoEntity.setRoleId(companyEntity.getRoleId());
customerInfoEntity.setCompanyName(companyEntity.getCompanyName());
customerInfoEntity.setCustomerName(companyEntity.getCompanyName());
customerInfoService.updateCustomerInfo(customerInfoEntity); customerInfoService.updateCustomerInfo(customerInfoEntity);
//获取该供应商下面的用户 //获取该供应商下面的用户
List<AuthAdmin> authAdmin=authAdminService.findByCustomerld(companyEntity.getCustomerId()); List<AuthAdmin> authAdmin = authAdminService.findByCustomerld(companyEntity.getCustomerId());
for (AuthAdmin obj:authAdmin){ for (AuthAdmin obj : authAdmin) {
AuthRoleAdmin authRoleAdmin=new AuthRoleAdmin(); AuthRoleAdmin authRoleAdmin = new AuthRoleAdmin();
authRoleAdmin.setUser_id(obj.getId()); authRoleAdmin.setUser_id(obj.getId());
authRoleAdmin.setRole_id(Long.valueOf(companyEntity.getRoleId())); authRoleAdmin.setRole_id(Long.valueOf(companyEntity.getRoleId()));
authRoleAdminService.updateAuthRoleAdmin(authRoleAdmin); authRoleAdminService.updateAuthRoleAdmin(authRoleAdmin);
@ -344,10 +345,10 @@ public class SupCompanyController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("api/pur/supCompany/getRoId") @GetMapping("api/pur/supCompany/getRoId")
public BaseResponse getRoId( String companyId) { public BaseResponse getRoId(String companyId) {
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(companyId); CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(companyId);
return ResultVOUtils.success(customerInfoEntity); return ResultVOUtils.success(customerInfoEntity);
} }

@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: dev active: pro
jmx: jmx:
enabled: false enabled: false

Loading…
Cancel
Save