添加供应商功能及修改员工头像问题

This commit is contained in:
yangjun 2026-03-23 16:28:40 +08:00
parent 882cc9398f
commit 50fd9e79d0
7 changed files with 28 additions and 0 deletions

View File

@ -14,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface NuBizSuppliersOrgMapper extends BaseMapper<NuBizSuppliersOrg> { public interface NuBizSuppliersOrgMapper extends BaseMapper<NuBizSuppliersOrg> {
List<NuBizSuppliersOrg> groupBySuppInfo(@Param("suppliersId") String suppliersId);
} }

View File

@ -2,4 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nu.modules.bizSuppliers.mapper.NuBizSuppliersOrgMapper"> <mapper namespace="com.nu.modules.bizSuppliers.mapper.NuBizSuppliersOrgMapper">
<select id="groupBySuppInfo" resultType="com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg">
select org_code from nu_biz_suppliers_org where suppliers_id = #{suppliersId} GROUP BY org_code
</select>
</mapper> </mapper>

View File

@ -3,6 +3,8 @@ package com.nu.modules.bizSuppliers.service;
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg; import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @Description: 供应商-机构中间表 * @Description: 供应商-机构中间表
* @Author: jeecg-boot * @Author: jeecg-boot
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface INuBizSuppliersOrgService extends IService<NuBizSuppliersOrg> { public interface INuBizSuppliersOrgService extends IService<NuBizSuppliersOrg> {
List<NuBizSuppliersOrg> groupBySuppInfo(String suppliersId);
} }

View File

@ -292,6 +292,16 @@ public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersAp
nuBizSuppliersMaterialInfo.setSalesUnit(suppliersMaterialInfoDto.getSalesUnit()); nuBizSuppliersMaterialInfo.setSalesUnit(suppliersMaterialInfoDto.getSalesUnit());
nuBizSuppliersMaterialInfo.setSalesUnitPrice(suppliersMaterialInfoDto.getSalesUnitPrice()); nuBizSuppliersMaterialInfo.setSalesUnitPrice(suppliersMaterialInfoDto.getSalesUnitPrice());
nuBizSuppliersMaterialInfoMapper.updateById(nuBizSuppliersMaterialInfo); nuBizSuppliersMaterialInfoMapper.updateById(nuBizSuppliersMaterialInfo);
//修改对应机构的数据
List<NuBizSuppliersOrg> supList = suppliersOrgService.groupBySuppInfo(suppliersMaterialInfoDto.getSuppliersId());
SuppliersMaterialInfoDto suppliersInfoMQDto = new SuppliersMaterialInfoDto();
suppliersInfoMQDto.setId(suppliersMaterialInfoDto.getId());
suppliersInfoMQDto.setSalesUnit(suppliersMaterialInfoDto.getSalesUnit());
suppliersInfoMQDto.setSalesUnitPrice(suppliersMaterialInfoDto.getSalesUnitPrice());
for (NuBizSuppliersOrg nuBizSuppliersOrg : supList){
rabbitMQUtil.sendToExchange("nu.suppliers.applyStatus", nuBizSuppliersOrg.getOrgCode() + ".suppliers.updateMaterialInfo", suppliersInfoMQDto);
}
return suppliersMaterialInfoDto; return suppliersMaterialInfoDto;
} }

View File

@ -7,6 +7,8 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/** /**
* @Description: 供应商-机构中间表 * @Description: 供应商-机构中间表
* @Author: jeecg-boot * @Author: jeecg-boot
@ -16,4 +18,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service @Service
public class NuBizSuppliersOrgServiceImpl extends ServiceImpl<NuBizSuppliersOrgMapper, NuBizSuppliersOrg> implements INuBizSuppliersOrgService { public class NuBizSuppliersOrgServiceImpl extends ServiceImpl<NuBizSuppliersOrgMapper, NuBizSuppliersOrg> implements INuBizSuppliersOrgService {
@Override
public List<NuBizSuppliersOrg> groupBySuppInfo(String suppliersId) {
return baseMapper.groupBySuppInfo(suppliersId);
}
} }

View File

@ -88,6 +88,7 @@ public class NuEmployeesAdvisoryInfoServiceImpl extends ServiceImpl<NuEmployeesA
EmployeesOrg emAdd = new EmployeesOrg(); EmployeesOrg emAdd = new EmployeesOrg();
BeanUtils.copyProperties(dto, emAdd); BeanUtils.copyProperties(dto, emAdd);
emAdd.setCreateTime(new Date());
emAdd.setId(null); emAdd.setId(null);
emAdd.setEmployeesId(dto.getId()); emAdd.setEmployeesId(dto.getId());
emAdd.setIzHistory("N"); emAdd.setIzHistory("N");

View File

@ -66,6 +66,10 @@ public class SuppliersMaterialInfoDto implements Serializable {
@Excel(name = "品牌型号", width = 15) @Excel(name = "品牌型号", width = 15)
@ApiModelProperty(value = "品牌型号") @ApiModelProperty(value = "品牌型号")
private String brandType; private String brandType;
/**生产厂家*/
@Excel(name = "生产厂家", width = 15)
@ApiModelProperty(value = "生产厂家")
private String manufacturer;
/**销售单价*/ /**销售单价*/
@Excel(name = "销售单价", width = 15) @Excel(name = "销售单价", width = 15)
@ApiModelProperty(value = "销售单价") @ApiModelProperty(value = "销售单价")