同步代码

master
wangwei 2 years ago
parent f3775a5e48
commit d55aeac0e7

@ -224,7 +224,7 @@ public class SysUserController extends BaseController {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK); return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
} }
// 修改角色 // 修改角色
userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles()); // userService.insertUserAuth(authAdmin.getId(), authUserSaveRequest.getRoles());
//修改所属部门 //修改所属部门
deptUserService.deleteByUser(authUserSaveRequest.getId()); deptUserService.deleteByUser(authUserSaveRequest.getId());

@ -10,6 +10,7 @@ import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicCorpEntity;
import com.glxp.api.entity.basic.UdiEntity; import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.entity.basic.UdiRlSupEntity; import com.glxp.api.entity.basic.UdiRlSupEntity;
import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.entity.system.CompanyEntity;
import com.glxp.api.exception.JsonException; import com.glxp.api.exception.JsonException;
@ -28,6 +29,7 @@ import com.glxp.api.service.basic.*;
import com.glxp.api.service.system.CompanyService; import com.glxp.api.service.system.CompanyService;
import com.glxp.api.util.SupplementVailUtil; import com.glxp.api.util.SupplementVailUtil;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -64,6 +66,8 @@ public class UdiRlSupController {
private CompanyProductRelevanceService companyProductRelevanceService; private CompanyProductRelevanceService companyProductRelevanceService;
@Resource @Resource
private SupplementVailUtil supplementVailUtil; private SupplementVailUtil supplementVailUtil;
@Resource
private UdiProductService udiProductService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/sale/info/company/product/relevance/filter") @GetMapping("/sale/info/company/product/relevance/filter")
@ -223,6 +227,9 @@ public class UdiRlSupController {
if (vailResult != null) if (vailResult != null)
return ResultVOUtils.error(500, vailResult); return ResultVOUtils.error(500, vailResult);
companyProductsRelService.insertCompanyProducts(udiInfoExportRequest); companyProductsRelService.insertCompanyProducts(udiInfoExportRequest);
UdiProductEntity udiProductEntity = new UdiProductEntity();
BeanUtils.copyProperties(udiProductEntity,udiInfoExportRequest.getSupplementRequest());
udiProductService.insertUdiInfo(udiProductEntity);
return ResultVOUtils.success("后台正在导入,请稍后刷新查看!"); return ResultVOUtils.success("后台正在导入,请稍后刷新查看!");
} }

@ -96,6 +96,30 @@ public class SupCertController {
if (postSelCertRequest.getCertType() == null) { if (postSelCertRequest.getCertType() == null) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if(postSelCertRequest.getManufacturerIdFk()==null) {
String errMsg = "";
ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size();
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
i--;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest();
supCertRequest.setName(supCertSetEntity.getName());
supCertRequest.setCustomerId(customerId);
List<SupCertEntity> supCertEntities = supCertService.selectCompanyCert(supCertRequest);
if (supCertEntities.size() != 0) {
list.add(supCertEntities.get(0).getName());
if (supCertEntities.size() != 0 && i == 0) {
for (String s : list) {
errMsg = errMsg + "," + s;
}
return ResultVOUtils.error(999, errMsg.substring(1) + "已存在!");
}
}
}
}
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) { for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
SupCertEntity supCertEntity = new SupCertEntity(); SupCertEntity supCertEntity = new SupCertEntity();
supCertEntity.setName(supCertSetEntity.getName()); supCertEntity.setName(supCertSetEntity.getName());

@ -31,6 +31,7 @@ import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupCertSetService; import com.glxp.api.service.purchase.SupCertSetService;
import com.glxp.api.service.purchase.SupCompanyService; import com.glxp.api.service.purchase.SupCompanyService;
import com.glxp.api.util.CustomUtil; import com.glxp.api.util.CustomUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -69,6 +70,8 @@ public class SupCompanyController {
CustomerInfoService customerInfoService; CustomerInfoService customerInfoService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/api/pur/getSupComapnys") @GetMapping("/api/pur/getSupComapnys")
public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) { public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) {

@ -193,7 +193,7 @@ public class SupManufacturerController {
if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) { if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if(supManufacturerEntity.getId()==0){//新增
//判断用户名和社会信用代码不能重复 //判断用户名和社会信用代码不能重复
FilterSupManufacturerRequest filterSupManufacturerRequest=new FilterSupManufacturerRequest(); FilterSupManufacturerRequest filterSupManufacturerRequest=new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName()); filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName());
@ -209,6 +209,7 @@ public class SupManufacturerController {
if(companyEntities.size()>0){ if(companyEntities.size()>0){
return ResultVOUtils.error(999,"统一社会信用代码不能重复!"); return ResultVOUtils.error(999,"统一社会信用代码不能重复!");
} }
}
//提交审核 //提交审核
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {

@ -194,6 +194,7 @@ public class SupProductController {
} }
} }
//提交审核 //提交审核
if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {
//判断是否上级供应商是否审核通过 //判断是否上级供应商是否审核通过
@ -241,7 +242,7 @@ public class SupProductController {
return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!"); return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!");
} }
}
supProductEntity.setUpdateTime(new Date()); supProductEntity.setUpdateTime(new Date());
SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId()); SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId());
supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(), supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(),

@ -59,6 +59,7 @@ public class ThrProductsAddController {
} else { } else {
filterThrProductsRequest.setCustomerId(filterThrProductsRequest.getSupId()); filterThrProductsRequest.setCustomerId(filterThrProductsRequest.getSupId());
} }
filterThrProductsRequest.setThirdSysFk(filterThrProductsRequest.getThirdSys());
List<ThrProductsAddEntity> thrProductsAddEntities List<ThrProductsAddEntity> thrProductsAddEntities
= thrProductsAddService.filterThrProductsRequest(filterThrProductsRequest); = thrProductsAddService.filterThrProductsRequest(filterThrProductsRequest);
PageInfo<ThrProductsAddEntity> pageInfo; PageInfo<ThrProductsAddEntity> pageInfo;

@ -19,6 +19,8 @@ public interface SupCertDao {
List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest); List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest);
boolean updateCompanyCert(SupCertEntity supCertEntity); boolean updateCompanyCert(SupCertEntity supCertEntity);
boolean insertCompanyCert(SupCertEntity supCertEntity); boolean insertCompanyCert(SupCertEntity supCertEntity);

@ -7,7 +7,6 @@ import lombok.Data;
*/ */
@Data @Data
public class AuthRoleAdmin { public class AuthRoleAdmin {
private Long id;
private Long role_id; private Long role_id;
private Long user_id; private Long user_id;

@ -21,6 +21,8 @@ public interface SupCertService {
List<SupCertEntity> findAll(String customerId, String manufacturerId, String productId); List<SupCertEntity> findAll(String customerId, String manufacturerId, String productId);
List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest); List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest);

@ -31,6 +31,19 @@ public class SupCertServiceImpl implements SupCertService {
} }
return supCertDao.filterCompanyCert(filterSupCertRequest); return supCertDao.filterCompanyCert(filterSupCertRequest);
} }
@Override
public List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest) {
if (filterSupCertRequest == null) {
return Collections.emptyList();
}
if (filterSupCertRequest.getPage() != null) {
int offset = (filterSupCertRequest.getPage() - 1) * filterSupCertRequest.getLimit();
PageHelper.offsetPage(offset, filterSupCertRequest.getLimit());
}
List<SupCertEntity> companyEntities = supCertDao.getCompanyCert(filterSupCertRequest);
return companyEntities;
}
@Override @Override

@ -49,6 +49,13 @@
</where> </where>
LIMIT 1 LIMIT 1
</select> </select>
<select id="findByCustomerld" parameterType="hashmap" resultType="com.glxp.api.entity.auth.AuthAdmin">
SELECT *
FROM auth_user
<where>
CustomerId = #{CustomerId}
</where>
</select>
<select id="findById" parameterType="hashmap" resultType="com.glxp.api.entity.auth.AuthAdmin"> <select id="findById" parameterType="hashmap" resultType="com.glxp.api.entity.auth.AuthAdmin">
SELECT * SELECT *

@ -86,7 +86,6 @@
basic_products.cplx, basic_products.cplx,
basic_products.hchzsb, basic_products.hchzsb,
basic_products.cpdls, basic_products.cpdls,
basic_products.price,
basic_products.basicPrductRemak1, basic_products.basicPrductRemak1,
basic_products.basicPrductRemak2, basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3, basic_products.basicPrductRemak3,

@ -36,6 +36,20 @@
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<select id="selectCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
SELECT * FROM sup_cert
<where>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
<if test="name != null and name != ''">
and #{name}
</if>
</where>
</select>
<select id="findCompanyCertByName" parameterType="java.lang.String" <select id="findCompanyCertByName" parameterType="java.lang.String"
resultType="com.glxp.api.entity.purchase.SupCertEntity"> resultType="com.glxp.api.entity.purchase.SupCertEntity">

@ -68,7 +68,7 @@
<select id="getRegistration" parameterType="com.glxp.api.req.purchase.FilterPoductRequest" <select id="getRegistration" parameterType="com.glxp.api.req.purchase.FilterPoductRequest"
resultType="com.glxp.api.res.purchase.SupProductResponse"> resultType="com.glxp.api.res.purchase.SupProductResponse">
SELECT sup_product.* ,sup_company.companyName SELECT sup_product.* ,sup_company.companyName
supName,sup_manufacturer.companyName manufacturerName FROM sup_product supName,sup_manufacturer.companyName manufacturerName,sup_manufacturer.companyName FROM sup_product
inner join sup_company inner join sup_company
on sup_product.customerId = sup_company.customerId on sup_product.customerId = sup_company.customerId
INNER JOIN sup_manufacturer INNER JOIN sup_manufacturer

Loading…
Cancel
Save