添加采购单的信息
This commit is contained in:
parent
01e62c4b65
commit
29537b5ad9
|
|
@ -53,10 +53,14 @@ public class InvoicingApi {
|
|||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<MaterialInfoEntity> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getSuppliers()),"suppliers_id", materialInfoEntity.getSuppliers());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getNuId()),"nu_id", materialInfoEntity.getNuId());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getSuppliers()),"suppliers", materialInfoEntity.getSuppliers());
|
||||
queryWrapper.apply(StringUtils.isNotBlank(materialInfoEntity.getNuId()),"NOT EXISTS ( SELECT 1 FROM nu_invoicing_qgd_info b WHERE b.wl_id = a.wl_id and b.suppliers_id = a.suppliers_id AND b.nu_id = '"+materialInfoEntity.getNuId()+"')");
|
||||
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getWlId()),"wl_id", materialInfoEntity.getWlId());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getTypeId()),"type_id", materialInfoEntity.getTypeId());
|
||||
queryWrapper.apply(StringUtils.isNotBlank(materialInfoEntity.getWlParamInfo()),"( material_name like '%"+materialInfoEntity.getWlParamInfo()+"%' or material_no like '%"+materialInfoEntity.getWlParamInfo()+"%' or pinyin like '%"+materialInfoEntity.getWlParamInfo()+"%' or specification_model like '%"+materialInfoEntity.getWlParamInfo()+"%' ) ");
|
||||
if(StringUtils.isNotBlank(materialInfoEntity.getIds())){
|
||||
queryWrapper.in( "suppliers", materialInfoEntity.getIds().split(","));
|
||||
}
|
||||
Page<MaterialInfoEntity> page = new Page<MaterialInfoEntity>(pageNo, pageSize);
|
||||
IPage<MaterialInfoEntity> pageList = invoicingApi.wlShoppingList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
|
@ -151,12 +155,6 @@ public class InvoicingApi {
|
|||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取采购单数量", notes="采购单-获取采购单数量")
|
||||
@GetMapping(value = "/getCgdListNum")
|
||||
public Result<Map<String,Object>> getCgdListNum(CgdMainEntity cgdMainEntityDto) {
|
||||
Map<String,Object> pageList = invoicingApi.getCgdListNum(cgdMainEntityDto);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "采购单-查询采购单详细信息", notes = "采购单-查询采购单详细信息")
|
||||
@GetMapping(value = "/queryCgdInfoList")
|
||||
|
|
@ -169,57 +167,11 @@ public class InvoicingApi {
|
|||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-审核采购单信息", notes="采购单-审核采购单信息")
|
||||
@AutoLog(value = "采购单-审核采购单信息",clientType="app")
|
||||
@PostMapping(value = "/reviewPurchaseOrder")
|
||||
public Result<String> reviewPurchaseOrder(CgdMainEntity cgdMainEntity, HttpServletRequest req) {
|
||||
invoicingApi.reviewPurchaseOrder(cgdMainEntity);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(采购列表使用)", notes="采购单-获取物料分类树(采购列表使用)")
|
||||
@GetMapping(value = "/getMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(购物车使用)", notes="采购单-获取物料分类树(购物车使用)")
|
||||
@GetMapping(value = "/getGwcMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getGwcMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getGwcMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(采购单使用)", notes="采购单-获取物料分类树(采购单使用)")
|
||||
@GetMapping(value = "/getCgdMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getCgdMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getCgdMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(库存预警使用)", notes="采购单-获取物料分类树(库存预警使用)")
|
||||
@GetMapping(value = "/getWaringMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getWaringMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getWaringMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-修改库房启用停用", notes="采购单-修改库房启用停用")
|
||||
@AutoLog(value = "采购单-修改库房启用停用",clientType="app")
|
||||
@PostMapping(value = "/updateKfstatus")
|
||||
public Result<String> updateKfstatus(@RequestBody NuBaseInfoEntity nuBaseInfoEntity) {
|
||||
invoicingApi.updateKfstatus(nuBaseInfoEntity);
|
||||
return Result.OK("修改成功!");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "采购单-通过nuId获取单元信息", notes = "采购单-通过nuId获取单元信息")
|
||||
|
|
@ -286,21 +238,8 @@ public class InvoicingApi {
|
|||
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树可采购的物料数量(购物车列表使用)", notes="采购单-获取物料分类树可采购的物料数量(购物车列表使用)")
|
||||
@GetMapping(value = "/getGwcTreeDataWlnum")
|
||||
public Result<Map<String,Object>> getGwcTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String,Object> pageList = invoicingApi.getGwcTreeDataWlnum(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树可采购的物料数量(采购单列表使用)", notes="采购单-获取物料分类树可采购的物料数量(采购单列表使用)")
|
||||
@GetMapping(value = "/getCgdTreeDataWlnum")
|
||||
public Result<Map<String,Object>> getCgdTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String,Object> pageList = invoicingApi.getCgdTreeDataWlnum(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "采购单-查询全部供应商信息", notes = "采购单-查询全部供应商信息")
|
||||
@GetMapping(value = "/getGysList")
|
||||
|
|
@ -318,13 +257,24 @@ public class InvoicingApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "采购单-拣货照片上传", notes = "采购单-拣货照片上传")
|
||||
@PostMapping(value = "/saveJhzpList")
|
||||
public Result<String> saveJhzpList(@RequestBody List<NuInvoicingCgdJhPicEntity> saveList) {
|
||||
if(saveList == null || saveList.size()==0){
|
||||
return Result.error("拣货照片上传数据错误");
|
||||
}
|
||||
String result = invoicingApi.saveJhzpList(saveList);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "采购单-查询拣货照片集合", notes = "采购单-查询拣货照片集合")
|
||||
@GetMapping(value = "/queryJhzpList")
|
||||
public Result<List<Map<String,Object>>> queryCgdInfoList(WarehouseMaterialCrkInfoEntity warehouseMaterialCrkInfoEntityDto,
|
||||
public Result<List<Map<String,Object>>> queryCgdInfoList(NuInvoicingCgdJhPicEntity nuInvoicingCgdJhPicEntity,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
List<Map<String,Object>> pageList = invoicingApi.queryJhzpList(pageNo, pageSize, warehouseMaterialCrkInfoEntityDto,req);
|
||||
List<Map<String,Object>> pageList = invoicingApi.queryJhzpList(pageNo, pageSize, nuInvoicingCgdJhPicEntity,req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
|
@ -364,23 +314,6 @@ public class InvoicingApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="采购单-库存预警添加全部物料", notes="采购单-库存预警添加全部物料")
|
||||
@AutoLog(value = "采购单-库存预警添加全部物料",clientType="app", operateType = 2)
|
||||
@PostMapping(value = "/addWaringAll")
|
||||
public Result<String> addWaringAll(@RequestBody CgdInfoEntity cgdInfoEntityDto) {
|
||||
if(StringUtils.isEmpty(cgdInfoEntityDto.getNuId())){
|
||||
return Result.error("请选择库房");
|
||||
}
|
||||
Integer maxCount = 100;//最大可添加数量
|
||||
String result = invoicingApi.addWaringAll(cgdInfoEntityDto,maxCount);
|
||||
if("4".equals( result)){
|
||||
return Result.error("购物车最大可添加"+maxCount+"条采购信息,已超出限制,不可再进行采购");
|
||||
}
|
||||
if("5".equals( result)){
|
||||
return Result.error("当前物料已在购物车中,本次库存预警「添加全部」操作完成,购物车数量未变化");
|
||||
}
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@ApiOperation(value="采购单-拣货物料", notes="采购单-拣货物料")
|
||||
@AutoLog(value = "采购单-拣货物料",clientType="app", operateType = 2)
|
||||
|
|
@ -569,6 +502,11 @@ public class InvoicingApi {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 盘点进度
|
||||
* @param materialInfoEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getPdjd")
|
||||
public Result<Map<String,String>> getPdjd(MaterialInfoEntity materialInfoEntity) {
|
||||
if(StringUtils.isBlank(materialInfoEntity.getNuId())){
|
||||
|
|
@ -578,5 +516,86 @@ public class InvoicingApi {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 拣货进度
|
||||
* @param cgdMainEntity
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getJhjd")
|
||||
public Result<Map<String,String>> getJhjd(CgdMainEntity cgdMainEntity) {
|
||||
if(StringUtils.isBlank(cgdMainEntity.getCgdId())){
|
||||
return Result.error("参数错误,请选择采购单");
|
||||
}
|
||||
Map<String,String> pageList = invoicingApi.getJhjd(cgdMainEntity);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取采购单数量", notes="采购单-获取采购单数量")
|
||||
@GetMapping(value = "/getCgdListNum")
|
||||
public Result<Map<String,Object>> getCgdListNum(CgdMainEntity cgdMainEntityDto) {
|
||||
Map<String,Object> pageList = invoicingApi.getCgdListNum(cgdMainEntityDto);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(采购列表使用)", notes="采购单-获取物料分类树(采购列表使用)")
|
||||
@GetMapping(value = "/getMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(采购单使用)", notes="采购单-获取物料分类树(采购单使用)")
|
||||
@GetMapping(value = "/getCgdMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getCgdMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getCgdMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树可采购的物料数量(采购单列表使用)", notes="采购单-获取物料分类树可采购的物料数量(采购单列表使用)")
|
||||
@GetMapping(value = "/getCgdTreeDataWlnum")
|
||||
public Result<Map<String,Object>> getCgdTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String,Object> pageList = invoicingApi.getCgdTreeDataWlnum(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="采购单-获取待采购物料分类树(待采购列表使用)", notes="采购单-获取物料分类树(待采购列表使用)")
|
||||
@GetMapping(value = "/getDcgMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getDcgMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getDcgMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="采购单-待采购的物料数量(待采购列表使用)", notes="采购单-待采购的物料数量(待采购列表使用)")
|
||||
@GetMapping(value = "/getDcgTreeDataWlnum")
|
||||
public Result<Map<String,Object>> getDcgTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String,Object> pageList = invoicingApi.getDcgTreeDataWlnum(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树(购物车使用)", notes="采购单-获取物料分类树(购物车使用)")
|
||||
@GetMapping(value = "/getGwcMaterialTreeData")
|
||||
public Result<List<Map<String,Object>>> getGwcMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||
configMaterialCategory.setIzEnabled("Y");
|
||||
List<Map<String,Object>> pageList = invoicingApi.getGwcMaterialTreeData(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="采购单-获取物料分类树可采购的物料数量(购物车列表使用)", notes="采购单-获取物料分类树可采购的物料数量(购物车列表使用)")
|
||||
@GetMapping(value = "/getGwcTreeDataWlnum")
|
||||
public Result<Map<String,Object>> getGwcTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String,Object> pageList = invoicingApi.getGwcTreeDataWlnum(configMaterialCategory);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ public class CgdMainEntity implements Serializable {
|
|||
private String sysOrgCode;
|
||||
private String izNew;
|
||||
private String departName;
|
||||
private String orgAddress;
|
||||
private String[] qgdIds;
|
||||
/**
|
||||
* 供应商是否确认 N未确认 Y已确认
|
||||
|
|
@ -135,5 +136,6 @@ public class CgdMainEntity implements Serializable {
|
|||
private String izGuazhang;;
|
||||
private String ids;;
|
||||
private String typeId;;
|
||||
private String cgdId;;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,4 +124,5 @@ public class MaterialInfoEntity implements Serializable {
|
|||
|
||||
private BigDecimal salesUnitPrice;//采购单位
|
||||
private String salesUnit;//采购价格
|
||||
private String ids;//app查询条件,用于供应商集合
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 采购单拣货照片
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class NuInvoicingCgdJhPicEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**采购单信息id*/
|
||||
@ApiModelProperty(value = "采购单信息id")
|
||||
private String cgdInfoId;
|
||||
/**采购单id*/
|
||||
@ApiModelProperty(value = "采购单id")
|
||||
private String cgdId;
|
||||
/**拣货图片*/
|
||||
@ApiModelProperty(value = "拣货图片")
|
||||
private String jhPic;
|
||||
/**物料id*/
|
||||
@ApiModelProperty(value = "物料id")
|
||||
private String wlId;
|
||||
}
|
||||
|
|
@ -24,8 +24,6 @@ public interface IInvoicingApi {
|
|||
|
||||
IPage<CgdInfoEntity> queryCgdInfoList(Integer pageNo, Integer pageSize, CgdInfoEntity cgdInfoEntityDto, HttpServletRequest req);
|
||||
|
||||
void reviewPurchaseOrder(CgdMainEntity cgdMainEntity);
|
||||
|
||||
List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity configMaterialCategory);
|
||||
|
||||
void updateKfstatus(NuBaseInfoEntity nuBaseInfoEntity);
|
||||
|
|
@ -66,7 +64,7 @@ public interface IInvoicingApi {
|
|||
|
||||
List<Map<String,Object>> getCgrList(CgdMainEntity cgdMainEntityDto);
|
||||
|
||||
List<Map<String,Object>> queryJhzpList(Integer pageNo, Integer pageSize, WarehouseMaterialCrkInfoEntity warehouseMaterialCrkInfoEntityDto, HttpServletRequest req);
|
||||
List<Map<String,Object>> queryJhzpList(Integer pageNo, Integer pageSize, NuInvoicingCgdJhPicEntity nuInvoicingCgdJhPicEntity, HttpServletRequest req);
|
||||
|
||||
String addSxd(CgdSxdEntity cgdSxdEntityDto);
|
||||
|
||||
|
|
@ -109,4 +107,12 @@ public interface IInvoicingApi {
|
|||
InvoicingPddInfoEntity generatedPddInfo(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||
|
||||
Map<String, String> getPdjd(MaterialInfoEntity materialInfoEntity);
|
||||
|
||||
Map<String, String> getJhjd(CgdMainEntity cgdMainEntity);
|
||||
|
||||
String saveJhzpList(List<NuInvoicingCgdJhPicEntity> saveList);
|
||||
|
||||
List<Map<String, Object>> getDcgMaterialTreeData(MaterialCategoryEntity configMaterialCategory);
|
||||
|
||||
Map<String, Object> getDcgTreeDataWlnum(MaterialCategoryEntity configMaterialCategory);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,4 +31,6 @@ public interface ConfigMaterialCategoryMapper extends BaseMapper<ConfigMaterialC
|
|||
List<ConfigMaterialCategory> getWaringMaterialTreeData(@Param("params") ConfigMaterialCategory configMaterialCategory);
|
||||
|
||||
List<ConfigMaterialCategory> getAllWarehouseInfoList(@Param("params") ConfigMaterialCategory configMaterialCategory);
|
||||
|
||||
List<ConfigMaterialCategory> getDcgMaterialTreeData(@Param("params") ConfigMaterialCategory configMaterialCategory);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,12 +43,20 @@
|
|||
and a.iz_enabled = 'Y'
|
||||
GROUP BY b.category_id, b.type_id, b.medication_id
|
||||
</select>
|
||||
<select id="getDcgMaterialTreeData" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory">
|
||||
select distinct parent_id as category_id, material_type_id as type_id, '' as medication_id
|
||||
from nu_biz_suppliers_material_type
|
||||
</select>
|
||||
|
||||
<select id="getCgdMaterialTreeData" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory">
|
||||
select b.category_id, b.type_id, b.medication_id
|
||||
from nu_invoicing_cgd_info a
|
||||
left join nu_config_material_info b on a.wl_id = b.id
|
||||
where a.cgd_id = #{params.cgdId}
|
||||
<where>
|
||||
<if test="params.cgdId != null and params.params.cgdId != ''">
|
||||
and a.cgd_id = #{params.cgdId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY b.category_id, b.type_id, b.medication_id
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getGysListByWlId" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo">
|
||||
select a.id, a.suppliers, GROUP_CONCAT(b.suppliers_name) as suppliers_name
|
||||
select a.id, a.suppliers,a.suppliers as suppliers_id, GROUP_CONCAT(b.suppliers_name) as suppliers_name
|
||||
from nu_config_material_info a
|
||||
left join nu_config_suppliers_info b on FIND_IN_SET(b.id, a.suppliers)
|
||||
where a.id = #{wlId}
|
||||
|
|
|
|||
|
|
@ -32,4 +32,6 @@ public interface IConfigMaterialCategoryService extends IService<ConfigMaterialC
|
|||
List<Map<String, Object>> getWaringMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||
|
||||
List<Map<String, Object>> getAllMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||
|
||||
List<Map<String, Object>> getDcgMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -913,6 +913,142 @@ public class ConfigMaterialCategoryServiceImpl extends ServiceImpl<ConfigMateria
|
|||
|
||||
|
||||
|
||||
return infoMapList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getDcgMaterialTreeData(ConfigMaterialCategory configMaterialCategory) {
|
||||
|
||||
List<ConfigMaterialCategory> groupList = baseMapper.getDcgMaterialTreeData(configMaterialCategory);
|
||||
|
||||
String oneId = "";
|
||||
String twoId = "";
|
||||
String threeId = "";
|
||||
for(ConfigMaterialCategory par:groupList){
|
||||
if(par != null){
|
||||
oneId = oneId + par.getCategoryId()+",";
|
||||
twoId = twoId + par.getTypeId()+",";
|
||||
threeId = threeId + par.getMedicationId()+",";
|
||||
}
|
||||
}
|
||||
String[] oneParts = oneId.split(",");
|
||||
Set<String> oneSet = new LinkedHashSet<>(Arrays.asList(oneParts));
|
||||
oneId = String.join(",", oneSet);
|
||||
|
||||
String[] twoParts = twoId.split(",");
|
||||
Set<String> twoSet = new LinkedHashSet<>(Arrays.asList(twoParts));
|
||||
twoId = String.join(",", twoSet);
|
||||
|
||||
String[] threeParts = threeId.split(",");
|
||||
Set<String> threeSet = new LinkedHashSet<>(Arrays.asList(threeParts));
|
||||
threeId = String.join(",", threeSet);
|
||||
|
||||
//查询护理分类信息
|
||||
QueryWrapper<ConfigMaterialCategory> categoryQueryWrapper = new QueryWrapper<>();
|
||||
categoryQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||
categoryQueryWrapper.in("id",oneId.split(","));
|
||||
categoryQueryWrapper.eq("del_flag","0");
|
||||
categoryQueryWrapper.orderByAsc("sort");
|
||||
List<ConfigMaterialCategory> list =baseMapper.selectList(categoryQueryWrapper);
|
||||
|
||||
//查询护理类型信息
|
||||
QueryWrapper<ConfigMaterialType> typeQueryWrapper = new QueryWrapper<>();
|
||||
typeQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||
typeQueryWrapper.in("id",twoId.split(","));
|
||||
typeQueryWrapper.eq("del_flag","0");
|
||||
List<ConfigMaterialType> list2 = configMaterialTypeMapper.selectList(typeQueryWrapper);
|
||||
|
||||
//查询用药类型信息
|
||||
QueryWrapper<ConfigMaterialMedication> medicationQueryWrapper = new QueryWrapper<>();
|
||||
medicationQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||
medicationQueryWrapper.in("id",threeId.split(","));
|
||||
medicationQueryWrapper.eq("del_flag","0");
|
||||
List<ConfigMaterialMedication> list3 = configMaterialMedicationMapper.selectList(medicationQueryWrapper);
|
||||
|
||||
|
||||
|
||||
//查询物料类别下是否有物料数据
|
||||
List<ConfigMaterialCategory> onesjlist =baseMapper.selectIssjList();
|
||||
|
||||
//查询物料类型下是否有物料数据
|
||||
List<ConfigMaterialType> twosjlist =configMaterialTypeMapper.selectIssjList();
|
||||
|
||||
|
||||
|
||||
List<Map<String,Object>> wllxMapList = new ArrayList<Map<String,Object>>();
|
||||
for(ConfigMaterialType par : list2){
|
||||
Map<String,Object> wllxMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> yylxMapList = new ArrayList<Map<String,Object>>();
|
||||
for(ConfigMaterialMedication yylxPar:list3){
|
||||
if(StringUtils.equals(yylxPar.getTypeId(),par.getId())){
|
||||
Map<String,Object> yylxMap = new HashMap<String,Object>();
|
||||
yylxMap.put("key",yylxPar.getId());
|
||||
yylxMap.put("levle","3");
|
||||
yylxMap.put("title",yylxPar.getMedicationName());
|
||||
yylxMap.put("izEnabled",yylxPar.getIzEnabled());
|
||||
yylxMap.put("categoryId",yylxPar.getCategoryId());
|
||||
yylxMap.put("typeId",yylxPar.getTypeId());
|
||||
yylxMap.put("children","");
|
||||
yylxMap.put("parentIzEnabled",par.getIzEnabled());
|
||||
yylxMap.put("icon",yylxPar.getIcon());
|
||||
yylxMapList.add(yylxMap);
|
||||
}
|
||||
}
|
||||
int tjxj = 0;
|
||||
for(ConfigMaterialType twosjPar:twosjlist){
|
||||
if (StringUtils.equals(twosjPar.getId(),par.getId())){
|
||||
tjxj = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
wllxMap.put("tjxj",tjxj);
|
||||
wllxMap.put("key",par.getId());
|
||||
wllxMap.put("parentId",par.getCategoryId());
|
||||
wllxMap.put("title",par.getTypeName());
|
||||
wllxMap.put("levle","2");
|
||||
wllxMap.put("izEnabled",par.getIzEnabled());
|
||||
wllxMap.put("children",yylxMapList);
|
||||
wllxMap.put("categoryId",par.getCategoryId());
|
||||
wllxMap.put("typeId",par.getId());
|
||||
wllxMap.put("icon",par.getIcon());
|
||||
wllxMapList.add(wllxMap);
|
||||
}
|
||||
|
||||
List<Map<String,Object>> infoMapList = new ArrayList<Map<String,Object>>();
|
||||
int index = 0;
|
||||
for(ConfigMaterialCategory par : list){
|
||||
index++;
|
||||
Map<String,Object> infoMap = new HashMap<String,Object>();
|
||||
List<Map<String,Object>> wllxMap2List = new ArrayList<Map<String,Object>>();
|
||||
for(Map<String,Object> wllxPar : wllxMapList){
|
||||
if(StringUtils.equals(par.getId(),wllxPar.get("parentId").toString())){
|
||||
wllxPar.put("parentIzEnabled",par.getIzEnabled());
|
||||
wllxMap2List.add(wllxPar);
|
||||
}
|
||||
}
|
||||
int tjxj = 0;
|
||||
for(ConfigMaterialCategory onesjPar:onesjlist){
|
||||
if (StringUtils.equals(onesjPar.getId(),par.getId())){
|
||||
tjxj = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
infoMap.put("tjxj",tjxj);
|
||||
infoMap.put("key",par.getId());
|
||||
infoMap.put("title",par.getCategoryName());
|
||||
infoMap.put("levle","1");
|
||||
infoMap.put("izEnabled",par.getIzEnabled());
|
||||
infoMap.put("children",wllxMap2List);
|
||||
infoMap.put("categoryId",par.getId());
|
||||
infoMap.put("parentIzEnabled",par.getIzEnabled());
|
||||
infoMap.put("appIconPath",par.getAppIconPath());
|
||||
infoMap.put("appCheckIconPath",par.getAppCheckIconPath());
|
||||
infoMap.put("icon",par.getIcon());
|
||||
infoMapList.add(infoMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return infoMapList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package com.nu.modules.bizSuppliers.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersMaterialInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -15,4 +18,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
public interface NuBizSuppliersMaterialInfoMapper extends BaseMapper<NuBizSuppliersMaterialInfo> {
|
||||
|
||||
List<NuBizSuppliersMaterialInfo> noList(@Param("list") List<NuBizSuppliersMaterialInfo> list);
|
||||
|
||||
List<ConfigMaterialInfo> getDcgTreeDataWlnum( @Param(Constants.WRAPPER) QueryWrapper<ConfigMaterialInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,4 +20,11 @@
|
|||
AND nu_biz_suppliers_material_info.brand_type = exclude.brandType
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDcgTreeDataWlnum" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo">
|
||||
select a.* from nu_biz_suppliers_material_info a
|
||||
left JOIN nu_config_material_info b on a.wl_id = b.id
|
||||
where a.sales_unit_price is not null and a.sales_unit is not null
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.nu.modules.bizSuppliers.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersMaterialInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
|
@ -17,4 +19,6 @@ public interface INuBizSuppliersMaterialInfoService extends IService<NuBizSuppli
|
|||
List<NuBizSuppliersMaterialInfo> noList(List<NuBizSuppliersMaterialInfo> list);
|
||||
|
||||
void saveBacthMaterial(Map<String, Object> map);
|
||||
|
||||
List<ConfigMaterialInfo> getDcgTreeDataWlnum(QueryWrapper<ConfigMaterialInfo> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nu.dto.SuppliersInfoMQDto;
|
||||
import com.nu.dto.SuppliersMaterialInfoDto;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersInfo;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersMaterialInfo;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersMaterialType;
|
||||
|
|
@ -113,4 +114,9 @@ public class NuBizSuppliersMaterialInfoServiceImpl extends ServiceImpl<NuBizSupp
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ConfigMaterialInfo> getDcgTreeDataWlnum(QueryWrapper<ConfigMaterialInfo> queryWrapper) {
|
||||
return baseMapper.getDcgTreeDataWlnum(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.cgd.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdJhPic;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdJhPicService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 采购单拣货照片
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="采购单拣货照片")
|
||||
@RestController
|
||||
@RequestMapping("/cgd/nuInvoicingCgdJhPic")
|
||||
@Slf4j
|
||||
public class NuInvoicingCgdJhPicController extends JeecgController<NuInvoicingCgdJhPic, INuInvoicingCgdJhPicService> {
|
||||
@Autowired
|
||||
private INuInvoicingCgdJhPicService nuInvoicingCgdJhPicService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuInvoicingCgdJhPic
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "采购单拣货照片-分页列表查询")
|
||||
@ApiOperation(value="采购单拣货照片-分页列表查询", notes="采购单拣货照片-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuInvoicingCgdJhPic>> queryPageList(NuInvoicingCgdJhPic nuInvoicingCgdJhPic,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuInvoicingCgdJhPic> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdJhPic, req.getParameterMap());
|
||||
Page<NuInvoicingCgdJhPic> page = new Page<NuInvoicingCgdJhPic>(pageNo, pageSize);
|
||||
IPage<NuInvoicingCgdJhPic> pageList = nuInvoicingCgdJhPicService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuInvoicingCgdJhPic
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "采购单拣货照片-添加")
|
||||
@ApiOperation(value="采购单拣货照片-添加", notes="采购单拣货照片-添加")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_jh_pic:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuInvoicingCgdJhPic nuInvoicingCgdJhPic) {
|
||||
nuInvoicingCgdJhPicService.save(nuInvoicingCgdJhPic);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuInvoicingCgdJhPic
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "采购单拣货照片-编辑")
|
||||
@ApiOperation(value="采购单拣货照片-编辑", notes="采购单拣货照片-编辑")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_jh_pic:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuInvoicingCgdJhPic nuInvoicingCgdJhPic) {
|
||||
nuInvoicingCgdJhPicService.updateById(nuInvoicingCgdJhPic);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "采购单拣货照片-通过id删除")
|
||||
@ApiOperation(value="采购单拣货照片-通过id删除", notes="采购单拣货照片-通过id删除")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_jh_pic:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuInvoicingCgdJhPicService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "采购单拣货照片-批量删除")
|
||||
@ApiOperation(value="采购单拣货照片-批量删除", notes="采购单拣货照片-批量删除")
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_jh_pic:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuInvoicingCgdJhPicService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "采购单拣货照片-通过id查询")
|
||||
@ApiOperation(value="采购单拣货照片-通过id查询", notes="采购单拣货照片-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<NuInvoicingCgdJhPic> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuInvoicingCgdJhPic nuInvoicingCgdJhPic = nuInvoicingCgdJhPicService.getById(id);
|
||||
if(nuInvoicingCgdJhPic==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuInvoicingCgdJhPic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuInvoicingCgdJhPic
|
||||
*/
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_jh_pic:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuInvoicingCgdJhPic nuInvoicingCgdJhPic) {
|
||||
return super.exportXls(request, nuInvoicingCgdJhPic, NuInvoicingCgdJhPic.class, "采购单拣货照片");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("cgd:nu_invoicing_cgd_jh_pic:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuInvoicingCgdJhPic.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.nu.modules.cgd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 采购单拣货照片
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_invoicing_cgd_jh_pic")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_invoicing_cgd_jh_pic对象", description="采购单拣货照片")
|
||||
public class NuInvoicingCgdJhPic implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**采购单信息id*/
|
||||
@Excel(name = "采购单信息id", width = 15)
|
||||
@ApiModelProperty(value = "采购单信息id")
|
||||
private java.lang.String cgdInfoId;
|
||||
/**采购单id*/
|
||||
@Excel(name = "采购单id", width = 15)
|
||||
@ApiModelProperty(value = "采购单id")
|
||||
private java.lang.String cgdId;
|
||||
/**拣货图片*/
|
||||
@Excel(name = "拣货图片", width = 15)
|
||||
@ApiModelProperty(value = "拣货图片")
|
||||
private java.lang.String jhPic;
|
||||
/**物料id*/
|
||||
@Excel(name = "物料id", width = 15)
|
||||
@ApiModelProperty(value = "物料id")
|
||||
private java.lang.String wlId;
|
||||
}
|
||||
|
|
@ -267,5 +267,7 @@ public class NuInvoicingCgdMain implements Serializable {
|
|||
private BigDecimal xiaoJi;
|
||||
@TableField(exist = false)
|
||||
private String departName;
|
||||
@TableField(exist = false)
|
||||
private String orgAddress;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.CgdMainEntity;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
|
|
@ -30,4 +31,5 @@ public interface NuInvoicingCgdInfoMapper extends BaseMapper<NuInvoicingCgdInfo>
|
|||
List<NuInvoicingCgdInfo> getFkdList(@Param("params") NuInvoicingCgdInfo nuInvoicingCgdInfo);
|
||||
|
||||
NuInvoicingCgdMain getIzGuazhang(@Param("cgdId") String cgdId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.cgd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdJhPic;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 采购单拣货照片
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuInvoicingCgdJhPicMapper extends BaseMapper<NuInvoicingCgdJhPic> {
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.nu.modules.cgd.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.aliyun.apache.hc.core5.annotation.Contract;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
|
|
@ -29,4 +30,6 @@ public interface NuInvoicingCgdMainMapper extends BaseMapper<NuInvoicingCgdMain>
|
|||
|
||||
|
||||
List<NuInvoicingCgdMain> getCgdListNum(@Param("params") CgdMainEntity cgdMainEntityDto);
|
||||
|
||||
List<NuInvoicingCgdMain> selectCgdList(Page<NuInvoicingCgdMain> page,@Param(Constants.WRAPPER) QueryWrapper<NuInvoicingCgdMain> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,4 +88,6 @@
|
|||
SELECT cgd_id as id FROM nu_invoicing_cgd_info
|
||||
WHERE cgd_id = #{cgdId} and wrksl > 0 LIMIT 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nu.modules.cgd.mapper.NuInvoicingCgdJhPicMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -52,4 +52,11 @@
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCgdList" resultType="com.nu.modules.cgd.entity.NuInvoicingCgdMain">
|
||||
select a.*,b.depart_name as departName,b.address as org_address from nu_invoicing_cgd_main a
|
||||
left join sys_depart b on a.sys_org_code = b.org_code
|
||||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.cgd.service;
|
||||
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdJhPic;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 采购单拣货照片
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuInvoicingCgdJhPicService extends IService<NuInvoicingCgdJhPic> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.cgd.service.impl;
|
||||
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdJhPic;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdJhPicMapper;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdJhPicService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 采购单拣货照片
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2026-05-15
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuInvoicingCgdJhPicServiceImpl extends ServiceImpl<NuInvoicingCgdJhPicMapper, NuInvoicingCgdJhPic> implements INuInvoicingCgdJhPicService {
|
||||
|
||||
}
|
||||
|
|
@ -14,14 +14,12 @@ import com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory;
|
|||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialInfoMapper;
|
||||
import com.nu.modules.ConfigMaterial.service.IConfigMaterialCategoryService;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdInfo;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdMain;
|
||||
import com.nu.modules.cgd.entity.NuInvoicingCgdSxd;
|
||||
import com.nu.modules.cgd.entity.NuWarehouseMaterialCrkInfo;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdMainMapper;
|
||||
import com.nu.modules.cgd.mapper.NuInvoicingCgdSxdMapper;
|
||||
import com.nu.modules.cgd.mapper.NuWarehouseMaterialCrkInfoMapper;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersInfo;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersMaterialInfo;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersInfoService;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersMaterialInfoService;
|
||||
import com.nu.modules.cgd.entity.*;
|
||||
import com.nu.modules.cgd.mapper.*;
|
||||
import com.nu.modules.cgd.service.INuInvoicingCgdMainService;
|
||||
import com.nu.modules.configSuppliersInfo.entity.ConfigSuppliersInfo;
|
||||
import com.nu.modules.configSuppliersInfo.mapper.ConfigSuppliersInfoMapper;
|
||||
|
|
@ -86,6 +84,8 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
|
||||
@Autowired
|
||||
private NuWarehouseMaterialCrkInfoMapper crkInfoMapper;
|
||||
@Autowired
|
||||
private NuInvoicingCgdJhPicMapper cgdJhPicMapper;
|
||||
|
||||
@Autowired
|
||||
private IConfigMaterialCategoryService configMaterialCategoryService;
|
||||
|
|
@ -126,6 +126,10 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
@Autowired
|
||||
private NuInvoicingPddInfoMapper pddInfoMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private INuBizSuppliersMaterialInfoService nuBizSuppliersMaterialInfoService;
|
||||
|
||||
@Override
|
||||
public void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain) {
|
||||
}
|
||||
|
|
@ -423,26 +427,26 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
BeanUtils.copyProperties(cgdMainEntityDto,nuInvoicingCgdMain);
|
||||
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||
QueryWrapper<NuInvoicingCgdMain> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdMain, req.getParameterMap(), customeRuleMap);
|
||||
queryWrapper.apply(StringUtils.isNotBlank(cgdMainEntityDto.getCgdParamInfo()),"(cgd_no like '%"+cgdMainEntityDto.getCgdParamInfo()+"%' or gys_name like '%"+cgdMainEntityDto.getCgdParamInfo()+"%' or qg_by like '%"+cgdMainEntityDto.getCgdParamInfo()+"%' or gys_lxr like '%"+cgdMainEntityDto.getCgdParamInfo()+"%')");
|
||||
queryWrapper.in(StringUtils.isNotBlank(cgdMainEntityDto.getSuppliers()),"gys_id",cgdMainEntityDto.getSuppliers());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(cgdMainEntityDto.getCgBy()),"qg_by",cgdMainEntityDto.getCgBy());
|
||||
queryWrapper.gt(StringUtils.isNotBlank(cgdMainEntityDto.getStartTime()),"qg_date",cgdMainEntityDto.getStartTime());
|
||||
queryWrapper.lt(StringUtils.isNotBlank(cgdMainEntityDto.getEndTime()),"qg_date",cgdMainEntityDto.getEndTime());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(cgdMainEntityDto.getNuId()),"nu_id",cgdMainEntityDto.getNuId());
|
||||
queryWrapper.apply(StringUtils.isNotBlank(cgdMainEntityDto.getCgdParamInfo()),"(a.cgd_no like '%"+cgdMainEntityDto.getCgdParamInfo()+"%' or a.gys_name like '%"+cgdMainEntityDto.getCgdParamInfo()+"%' or a.qg_by like '%"+cgdMainEntityDto.getCgdParamInfo()+"%' or a.gys_lxr like '%"+cgdMainEntityDto.getCgdParamInfo()+"%')");
|
||||
queryWrapper.in(StringUtils.isNotBlank(cgdMainEntityDto.getSuppliers()),"a.gys_id",cgdMainEntityDto.getSuppliers());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(cgdMainEntityDto.getCgBy()),"a.qg_by",cgdMainEntityDto.getCgBy());
|
||||
queryWrapper.gt(StringUtils.isNotBlank(cgdMainEntityDto.getStartTime()),"a.qg_date",cgdMainEntityDto.getStartTime());
|
||||
queryWrapper.lt(StringUtils.isNotBlank(cgdMainEntityDto.getEndTime()),"a.qg_date",cgdMainEntityDto.getEndTime());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(cgdMainEntityDto.getNuId()),"a.nu_id",cgdMainEntityDto.getNuId());
|
||||
if(StringUtils.isNotBlank(cgdMainEntityDto.getIds())){
|
||||
queryWrapper.in("id",cgdMainEntityDto.getIds().split(","));
|
||||
queryWrapper.in("a.id",cgdMainEntityDto.getIds().split(","));
|
||||
}
|
||||
queryWrapper.in(StringUtils.isNotBlank(cgdMainEntityDto.getStatus()),"status",cgdMainEntityDto.getStatus());
|
||||
queryWrapper.in(StringUtils.isNotBlank(cgdMainEntityDto.getStatus()),"a.status",cgdMainEntityDto.getStatus());
|
||||
if(StringUtils.isNotBlank(cgdMainEntityDto.getCgdType())){
|
||||
if (cgdMainEntityDto.getCgdType().indexOf(",")>-1){
|
||||
queryWrapper.in("cgd_type",cgdMainEntityDto.getCgdType().split(","));
|
||||
queryWrapper.in("a.cgd_type",cgdMainEntityDto.getCgdType().split(","));
|
||||
}else if (cgdMainEntityDto.getCgdType().indexOf(",")==-1){
|
||||
queryWrapper.eq("cgd_type",cgdMainEntityDto.getCgdType());
|
||||
queryWrapper.eq("a.cgd_type",cgdMainEntityDto.getCgdType());
|
||||
}
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
queryWrapper.orderByDesc("a.create_time");
|
||||
Page<NuInvoicingCgdMain> page = new Page<>(pageNo, pageSize);
|
||||
List<NuInvoicingCgdMain> list = cgdMainMapper.selectList(page,queryWrapper);
|
||||
List<NuInvoicingCgdMain> list = cgdMainMapper.selectCgdList(page,queryWrapper);
|
||||
IPage<CgdMainEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
|
||||
entityPage.setRecords(BeanUtil.copyToList(list, CgdMainEntity.class));
|
||||
return entityPage;
|
||||
|
|
@ -514,18 +518,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
|
||||
return serverNetUrl + imageUrl;
|
||||
}
|
||||
@Override
|
||||
public void reviewPurchaseOrder(CgdMainEntity cgdMainEntity) {
|
||||
NuInvoicingCgdMain cgdMain = new NuInvoicingCgdMain();
|
||||
BeanUtils.copyProperties(cgdMainEntity,cgdMain);
|
||||
cgdInfoMapper.delete(new QueryWrapper<NuInvoicingCgdInfo>().eq("cgd_id",cgdMainEntity.getId()));
|
||||
for(CgdInfoEntity cgdInfoEntity : cgdMainEntity.getCgdInfoList()){
|
||||
NuInvoicingCgdInfo nuInvoicingCgdInfo = new NuInvoicingCgdInfo();
|
||||
BeanUtils.copyProperties(cgdInfoEntity,nuInvoicingCgdInfo);
|
||||
cgdInfoMapper.insert(nuInvoicingCgdInfo);
|
||||
}
|
||||
baseMapper.updateById(cgdMain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
||||
|
|
@ -535,6 +527,34 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getDcgMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
||||
ConfigMaterialCategory configMaterialCategory = new ConfigMaterialCategory();
|
||||
BeanUtils.copyProperties(materialCategoryEntity,configMaterialCategory);
|
||||
List<Map<String,Object>> pageList = configMaterialCategoryService.getDcgMaterialTreeData(configMaterialCategory);
|
||||
return pageList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDcgTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
QueryWrapper<ConfigMaterialInfo> queryWrapper = new QueryWrapper<ConfigMaterialInfo>();
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getCategoryId()),"b.category_id",configMaterialCategory.getCategoryId());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getTypeId()),"b.type_id",configMaterialCategory.getTypeId());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getMedicationId()),"b.medication_id",configMaterialCategory.getMedicationId());
|
||||
if(StringUtils.isNotBlank(configMaterialCategory.getSuppliers())){
|
||||
queryWrapper.in("a.suppliers_id",configMaterialCategory.getSuppliers().split(","));
|
||||
}
|
||||
queryWrapper.in(StringUtils.isNotBlank(configMaterialCategory.getNuId()),"a.nu_id",configMaterialCategory.getNuId());
|
||||
List<ConfigMaterialInfo> list = nuBizSuppliersMaterialInfoService.getDcgTreeDataWlnum(queryWrapper);
|
||||
map.put("success",true);
|
||||
map.put("message","物料数量");
|
||||
map.put("totalSize",list.size());
|
||||
map.put("ids",configMaterialCategory.getSuppliers());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateKfstatus(NuBaseInfoEntity nuBaseInfoEntity) {
|
||||
NuBaseInfo nuBaseInfo = new NuBaseInfo();
|
||||
|
|
@ -631,23 +651,26 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
public Map<String, Object> getTreeDataWlnum(MaterialCategoryEntity configMaterialCategory) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
QueryWrapper<ConfigMaterialInfo> queryWrapper = new QueryWrapper<ConfigMaterialInfo>();
|
||||
if(StringUtils.isEmpty(configMaterialCategory.getNuId())){
|
||||
map.put("success",false);
|
||||
map.put("message","参数错误");
|
||||
map.put("totalSize",null);
|
||||
return map;
|
||||
}
|
||||
queryWrapper.eq("a.nu_id",configMaterialCategory.getNuId());
|
||||
// if(StringUtils.isEmpty(configMaterialCategory.getNuId())){
|
||||
// map.put("success",false);
|
||||
// map.put("message","参数错误");
|
||||
// map.put("totalSize",null);
|
||||
// return map;
|
||||
// }
|
||||
queryWrapper.eq(StringUtils.isNotBlank(configMaterialCategory.getNuId()),"a.nu_id",configMaterialCategory.getNuId());
|
||||
queryWrapper.eq("a.del_flag","0");
|
||||
queryWrapper.eq("a.iz_enabled","Y");
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getCategoryId()),"b.category_id",configMaterialCategory.getCategoryId());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getTypeId()),"b.type_id",configMaterialCategory.getTypeId());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getMedicationId()),"b.medication_id",configMaterialCategory.getMedicationId());
|
||||
queryWrapper.in(StringUtils.isNotBlank(configMaterialCategory.getSuppliers()),"b.suppliers",configMaterialCategory.getSuppliers());
|
||||
if(StringUtils.isNotBlank(configMaterialCategory.getSuppliers())){
|
||||
queryWrapper.in("b.suppliers",configMaterialCategory.getSuppliers().split(","));
|
||||
}
|
||||
List<ConfigMaterialInfo> list = configMaterialInfoMapper.getTreeDataWlnum(queryWrapper);
|
||||
map.put("success",true);
|
||||
map.put("message","物料数量");
|
||||
map.put("totalSize",list.size());
|
||||
map.put("ids",configMaterialCategory.getSuppliers());
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -669,12 +692,15 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getCategoryId()),"b.category_id",configMaterialCategory.getCategoryId());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getTypeId()),"b.type_id",configMaterialCategory.getTypeId());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getMedicationId()),"b.medication_id",configMaterialCategory.getMedicationId());
|
||||
queryWrapper.in(StringUtils.isNotBlank(configMaterialCategory.getSuppliers()),"a.suppliers_id",configMaterialCategory.getSuppliers());
|
||||
if(StringUtils.isNotBlank(configMaterialCategory.getSuppliers())){
|
||||
queryWrapper.in("a.suppliers_id",configMaterialCategory.getSuppliers().split(","));
|
||||
}
|
||||
queryWrapper.in(StringUtils.isNotBlank(configMaterialCategory.getNuId()),"a.nu_id",configMaterialCategory.getNuId());
|
||||
List<ConfigMaterialInfo> list = configMaterialInfoMapper.getGwcTreeDataWlnum(queryWrapper);
|
||||
map.put("success",true);
|
||||
map.put("message","物料数量");
|
||||
map.put("totalSize",list.size());
|
||||
map.put("ids",configMaterialCategory.getSuppliers());
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -722,8 +748,16 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
info.setWlName(ConfigMaterialInfo.getMaterialName());
|
||||
info.setWlMaterialNo(ConfigMaterialInfo.getMaterialNo());
|
||||
info.setWlSpecificationModel(ConfigMaterialInfo.getSpecificationModel());
|
||||
// info.setReferenceUnitPrice(ConfigMaterialInfo.getReferenceUnitPrice());
|
||||
// info.setWlUnits(ConfigMaterialInfo.getMaterialUnits());
|
||||
|
||||
//供应商物料信息
|
||||
NuBizSuppliersMaterialInfo gysWlInfo = nuBizSuppliersMaterialInfoService.getOne(new QueryWrapper<NuBizSuppliersMaterialInfo>().eq("suppliers_id",info.getSuppliersId()).eq("wl_id",info.getWlId()));
|
||||
//供应商信息
|
||||
ConfigSuppliersInfo gysInfo = gysMapper.selectOne(new QueryWrapper<ConfigSuppliersInfo>().eq("id",info.getSuppliersId()));
|
||||
info.setReferenceUnitPrice(gysWlInfo.getSalesUnitPrice());
|
||||
info.setWlUnits(gysWlInfo.getSalesUnit());
|
||||
info.setSuppliersName(gysInfo.getSuppliersName());
|
||||
info.setBrandType(gysWlInfo.getBrandType());
|
||||
info.setManufacturer(gysWlInfo.getManufacturer());
|
||||
QgdInfo qgdInfoIns = new QgdInfo();
|
||||
BeanUtils.copyProperties(info,qgdInfoIns);
|
||||
qgdInfoIns.setId(null);
|
||||
|
|
@ -735,7 +769,8 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
public String eddShoppingCartList(QgdInfoEntity info) {
|
||||
QgdInfo qgdInfo = new QgdInfo();
|
||||
BeanUtils.copyProperties(info,qgdInfo);
|
||||
|
||||
ConfigSuppliersInfo gysInfo = gysMapper.selectOne(new QueryWrapper<ConfigSuppliersInfo>().eq("id",qgdInfo.getSuppliersId()));
|
||||
qgdInfo.setSuppliersName(gysInfo.getSuppliersName());
|
||||
qgdInfoMapper.updateById(qgdInfo);
|
||||
return "0";
|
||||
}
|
||||
|
|
@ -800,33 +835,20 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> queryJhzpList(Integer pageNo, Integer pageSize, WarehouseMaterialCrkInfoEntity warehouseMaterialCrkInfoEntityDto, HttpServletRequest req) {
|
||||
NuWarehouseMaterialCrkInfo warehouseMaterialCrkInfo = new NuWarehouseMaterialCrkInfo();
|
||||
BeanUtils.copyProperties(warehouseMaterialCrkInfoEntityDto,warehouseMaterialCrkInfo);
|
||||
QueryWrapper<NuWarehouseMaterialCrkInfo> queryWrapper = QueryGenerator.initQueryWrapper(warehouseMaterialCrkInfo, req.getParameterMap());
|
||||
queryWrapper.eq("cgd_id",warehouseMaterialCrkInfo.getCgdId());
|
||||
// queryWrapper.isNotNull("jh_pic");
|
||||
queryWrapper.eq("crk_status","1");
|
||||
queryWrapper.apply("(jh_pic is not null or jh_pic != '')");
|
||||
List<NuWarehouseMaterialCrkInfo> list = crkInfoMapper.selectList(queryWrapper);
|
||||
public List<Map<String,Object>> queryJhzpList(Integer pageNo, Integer pageSize, NuInvoicingCgdJhPicEntity nuInvoicingCgdJhPicEntity, HttpServletRequest req) {
|
||||
NuInvoicingCgdJhPic nuInvoicingCgdJhPic = new NuInvoicingCgdJhPic();
|
||||
BeanUtils.copyProperties(nuInvoicingCgdJhPicEntity,nuInvoicingCgdJhPic);
|
||||
QueryWrapper<NuInvoicingCgdJhPic> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingCgdJhPic, req.getParameterMap());
|
||||
queryWrapper.eq("cgd_info_id",nuInvoicingCgdJhPic.getCgdInfoId());
|
||||
List<NuInvoicingCgdJhPic> list = cgdJhPicMapper.selectList(queryWrapper);
|
||||
List<Map<String,Object>> jhlist = new ArrayList<>();
|
||||
for(NuWarehouseMaterialCrkInfo crkInfo : list){
|
||||
for(NuInvoicingCgdJhPic crkInfo : list){
|
||||
if(StringUtils.isNotBlank(crkInfo.getJhPic())){
|
||||
if(crkInfo.getJhPic().indexOf(",")>-1){
|
||||
for (String jhPicParam : crkInfo.getJhPic().split(",")){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("jhPic",jhPicParam);
|
||||
map.put("createTime",crkInfo.getCreateTime());
|
||||
map.put("createBy",crkInfo.getCreateBy());
|
||||
jhlist.add(map);
|
||||
}
|
||||
}else{
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("jhPic",crkInfo.getJhPic());
|
||||
map.put("createTime",crkInfo.getCreateTime());
|
||||
map.put("createBy",crkInfo.getCreateBy());
|
||||
jhlist.add(map);
|
||||
}
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("jhPic",crkInfo.getJhPic());
|
||||
map.put("createTime",crkInfo.getCreateTime());
|
||||
map.put("createBy",crkInfo.getCreateBy());
|
||||
jhlist.add(map);
|
||||
}
|
||||
}
|
||||
return jhlist;
|
||||
|
|
@ -1117,7 +1139,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
if(count == 1){
|
||||
cgdMain.setWjBy(loginUser.getRealname());
|
||||
cgdMain.setWjTime(new Date());
|
||||
cgdMain.setStatus("2");//已完结
|
||||
cgdMain.setStatus("3");//已完结
|
||||
cgdMain.setCgdType("2");//已完结
|
||||
//查询出入库记录为次采购单的入库记录
|
||||
List<NuWarehouseMaterialCrkInfo> crkInfoList = crkInfoMapper.selectList(new QueryWrapper<NuWarehouseMaterialCrkInfo>().eq("cgd_id",cgdInfo.getCgdId()).eq("crk_status","1").eq("crk_type","1"));
|
||||
|
|
@ -1685,4 +1707,27 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getJhjd(CgdMainEntity cgdMainEntity) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
Long count = cgdInfoMapper.selectCount(new QueryWrapper<NuInvoicingCgdInfo>().eq("cgd_id", cgdMainEntity.getCgdId()));
|
||||
Long count1 = cgdInfoMapper.selectCount(new QueryWrapper<NuInvoicingCgdInfo>().eq("cgd_id", cgdMainEntity.getCgdId()).in("status", "1","2"));
|
||||
map.put("totalNum",count.toString());
|
||||
map.put("jhNum",count1.toString());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveJhzpList(List<NuInvoicingCgdJhPicEntity> saveList) {
|
||||
String cgdInfoId = saveList.get(0).getCgdInfoId();
|
||||
cgdJhPicMapper.delete(new QueryWrapper<NuInvoicingCgdJhPic>().eq("cgd_info_id", cgdInfoId));
|
||||
for (NuInvoicingCgdJhPicEntity item : saveList) {
|
||||
NuInvoicingCgdJhPic entity = new NuInvoicingCgdJhPic();
|
||||
BeanUtils.copyProperties(item, entity);
|
||||
cgdJhPicMapper.insert(entity);
|
||||
}
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue