修改盘点流程计功能
This commit is contained in:
parent
97f1329957
commit
57115f0d91
|
|
@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.entity.*;
|
import com.nu.entity.*;
|
||||||
import com.nu.modules.invoicing.api.IInvoicingApi;
|
import com.nu.modules.invoicing.api.IInvoicingApi;
|
||||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|
@ -28,8 +27,6 @@ public class InvoicingApi {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IInvoicingApi invoicingApi;
|
private IInvoicingApi invoicingApi;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IDirectiveOrderApi directiveOrderApi;
|
|
||||||
|
|
||||||
@ApiOperation(value = "采购单-查询物料信息-分页列表查询", notes = "采购单-查询物料信息-分页列表查询")
|
@ApiOperation(value = "采购单-查询物料信息-分页列表查询", notes = "采购单-查询物料信息-分页列表查询")
|
||||||
@GetMapping(value = "/queryInvoicingList")
|
@GetMapping(value = "/queryInvoicingList")
|
||||||
|
|
@ -553,6 +550,62 @@ public class InvoicingApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓库-查询物料列表
|
||||||
|
* @param materialInfoEntity
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getCkWlList")
|
||||||
|
public Result<IPage<MaterialInfoEntity>> getCkWlList(MaterialInfoEntity materialInfoEntity,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<MaterialInfoEntity> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getSuppliers()),"c.suppliers_id", materialInfoEntity.getSuppliers());
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getNuId()),"a.nu_id", materialInfoEntity.getNuId());
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(materialInfoEntity.getWlId()),"a.wl_id", materialInfoEntity.getWlId());
|
||||||
|
queryWrapper.apply(StringUtils.isNotBlank(materialInfoEntity.getWlParamInfo()),"( b.material_name like '%"+materialInfoEntity.getWlParamInfo()+"%' or b.material_no like '%"+materialInfoEntity.getWlParamInfo()+"%' or b.pinyin like '%"+materialInfoEntity.getWlParamInfo()+"%' or b.specification_model like '%"+materialInfoEntity.getWlParamInfo()+"%' ) ");
|
||||||
|
Page<MaterialInfoEntity> page = new Page<MaterialInfoEntity>(pageNo, pageSize);
|
||||||
|
IPage<MaterialInfoEntity> pageList = invoicingApi.getCkWlList(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点单-查询盘点单信息-根据库房的id查询
|
||||||
|
* @param invoicingPddInfoEntity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getPddInfoById")
|
||||||
|
public Result<InvoicingPddInfoEntity> getPddInfoById(InvoicingPddInfoEntity invoicingPddInfoEntity) {
|
||||||
|
InvoicingPddInfoEntity pageList = invoicingApi.getPddInfoById(invoicingPddInfoEntity);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="盘点单-添加盘点信息", notes="盘点单-添加盘点信息")
|
||||||
|
@AutoLog(value = "盘点单-添加盘点信息",clientType="app", operateType = 3)
|
||||||
|
@PostMapping(value = "/savePddInfo")
|
||||||
|
public Result<InvoicingPddInfoEntity> savePddInfo(@RequestBody InvoicingPddInfoEntity invoicingPddInfoEntity) {
|
||||||
|
InvoicingPddInfoEntity result = invoicingApi.savePddInfo(invoicingPddInfoEntity);
|
||||||
|
return Result.OK(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="库存-修改销售价格", notes="库存-修改销售价格")
|
||||||
|
@AutoLog(value = "库存-修改销售价格",clientType="app", operateType = 3)
|
||||||
|
@PostMapping(value = "/editXsjg")
|
||||||
|
public Result<String> editXsjg(@RequestBody WarehouseMaterialInfoEntity warehouseMaterialInfoEntity) {
|
||||||
|
invoicingApi.editXsjg(warehouseMaterialInfoEntity);
|
||||||
|
return Result.OK("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static boolean toBoolean(Object obj) {
|
public static boolean toBoolean(Object obj) {
|
||||||
if (obj != null && !(Boolean) obj) {
|
if (obj != null && !(Boolean) obj) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nu.entity;
|
package com.nu.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
@ -25,56 +26,58 @@ import java.util.Date;
|
||||||
@Data
|
@Data
|
||||||
public class InvoicingPddInfoEntity implements Serializable {
|
public class InvoicingPddInfoEntity implements Serializable {
|
||||||
|
|
||||||
/**id*/
|
private java.lang.String id;
|
||||||
private String id;
|
|
||||||
/**createBy*/
|
/**createBy*/
|
||||||
private String createBy;
|
private java.lang.String createBy;
|
||||||
/**createTime*/
|
/**createTime*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private java.util.Date createTime;
|
||||||
/**updateBy*/
|
/**updateBy*/
|
||||||
private String updateBy;
|
private java.lang.String updateBy;
|
||||||
/**updateTime*/
|
/**updateTime*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private java.util.Date updateTime;
|
||||||
/**盘点单id*/
|
|
||||||
@Dict(dictTable = "nu_invoicing_pdd_main", dicText = "pdd_no", dicCode = "id")
|
|
||||||
private String pddId;
|
|
||||||
/**库房id*/
|
/**库房id*/
|
||||||
private String nuId;
|
private java.lang.String nuId;
|
||||||
/**物料id*/
|
/**物料id*/
|
||||||
private String wlId;
|
private java.lang.String wlId;
|
||||||
/**当前库存数量*/
|
/**当前库存数量*/
|
||||||
private Integer dqkcsl;
|
private java.lang.Double dqkcsl;
|
||||||
/**盘点数量*/
|
/**盘点数量*/
|
||||||
private Integer pdsl;
|
private java.lang.Double pdsl;
|
||||||
/**差额数量*/
|
/**差额数量*/
|
||||||
private Integer cesl;
|
private java.lang.Double cesl;
|
||||||
/**盘点类型 1盘盈单 2盘亏单*/
|
/**盘点类型 1盘盈单 2盘亏单 3作废*/
|
||||||
private String pdType;
|
@Dict(dicCode = "pd_type")
|
||||||
|
private java.lang.String pdType;
|
||||||
/**备注信息*/
|
/**备注信息*/
|
||||||
private String content;
|
private java.lang.String content;
|
||||||
/**拍照图片*/
|
/**拍照图片*/
|
||||||
private String picPath;
|
private java.lang.String picPath;
|
||||||
/**物料类别*/
|
/**物料类别*/
|
||||||
private String categoryName;
|
private java.lang.String categoryName;
|
||||||
/**物料类型*/
|
/**物料类型*/
|
||||||
private String typeName;
|
private java.lang.String typeName;
|
||||||
/**用药类型*/
|
/**用药类型*/
|
||||||
private String medicationName;
|
private java.lang.String medicationName;
|
||||||
/**货品名称*/
|
/**货品名称*/
|
||||||
private String materialName;
|
private java.lang.String materialName;
|
||||||
/**货品编码*/
|
/**货品编码*/
|
||||||
private String materialNo;
|
private java.lang.String materialNo;
|
||||||
/**规格型号*/
|
/**规格型号*/
|
||||||
private String specificationModel;
|
private java.lang.String specificationModel;
|
||||||
/**物料图片*/
|
/**物料图片*/
|
||||||
private String materialImg;
|
private java.lang.String materialImg;
|
||||||
/**货品单位*/
|
/**货品单位*/
|
||||||
private String materialUnits;
|
private java.lang.String materialUnits;
|
||||||
|
/**盘点单号*/
|
||||||
|
private java.lang.String pddNo;
|
||||||
|
/**库存id*/
|
||||||
|
private java.lang.String ckId;
|
||||||
|
|
||||||
|
|
||||||
/**查询条件 1盘盈单 2盘亏单 3已盘点 4未盘点 */
|
|
||||||
private String paramType;
|
private String paramType;
|
||||||
|
private java.lang.Integer num;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,4 +148,12 @@ public class MaterialInfoEntity implements Serializable {
|
||||||
private String manufacturer;
|
private String manufacturer;
|
||||||
/**机构价格*/
|
/**机构价格*/
|
||||||
private java.math.BigDecimal orgUnitPrice;
|
private java.math.BigDecimal orgUnitPrice;
|
||||||
|
private String ddNo;
|
||||||
|
private String cgdId;
|
||||||
|
private String cgdInfoId;
|
||||||
|
private String wlunits;
|
||||||
|
private String xsjg;
|
||||||
|
private String xsdw;
|
||||||
|
private Double arrivalPrice;
|
||||||
|
private Double procurementPrice;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,5 +65,9 @@ public class WarehouseMaterialCrkInfoEntity implements Serializable {
|
||||||
@Dict(dicCode = "crk_status")
|
@Dict(dicCode = "crk_status")
|
||||||
private String crkStatus;
|
private String crkStatus;
|
||||||
private String colomnDesc;
|
private String colomnDesc;
|
||||||
|
private Double xzsl;//销账数量
|
||||||
|
private Double gzsl;//挂账数量
|
||||||
|
private String ddNo;//订单号
|
||||||
|
private String cgBy;//采购人
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.nu.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
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.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 库房物料配置信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-08-28
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WarehouseMaterialInfoEntity implements Serializable {
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
private String id;
|
||||||
|
/**createBy*/
|
||||||
|
private String createBy;
|
||||||
|
/**createTime*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
/**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;
|
||||||
|
/**库房*/
|
||||||
|
@Dict(dictTable = "nu_base_info", dicText = "nu_name", dicCode = "nu_id")
|
||||||
|
private String nuId;
|
||||||
|
/**物料*/
|
||||||
|
@Dict(dictTable = "nu_config_material_info", dicText = "material_name", dicCode = "id")
|
||||||
|
private String wlId;
|
||||||
|
|
||||||
|
/**库存数量*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "#0.00")
|
||||||
|
private Double kcsl;
|
||||||
|
|
||||||
|
private String cgdInfoId;//采购单/退货单id
|
||||||
|
private String xsjg;//销售价格
|
||||||
|
private String xsdw;//销售单位
|
||||||
|
private String cgdId;//采购单主表id/退货单主表id
|
||||||
|
private String cgdType;//订单类型 1采购单 2退货单
|
||||||
|
private String ddNo;//单号
|
||||||
|
|
||||||
|
/**物料类别*/
|
||||||
|
@Dict(dictTable = "nu_config_material_category", dicText = "category_name", dicCode = "id")
|
||||||
|
private String categoryId;
|
||||||
|
/**物料类型*/
|
||||||
|
@Dict(dictTable = "nu_config_material_type", dicText = "type_name", dicCode = "id")
|
||||||
|
private String typeId;
|
||||||
|
/**用药类型*/
|
||||||
|
@Dict(dictTable = "nu_config_material_medication", dicText = "medication_name", dicCode = "id")
|
||||||
|
private String medicationId;
|
||||||
|
/**货品名称*/
|
||||||
|
private String materialName;
|
||||||
|
/**货品编码*/
|
||||||
|
private String materialNo;
|
||||||
|
/**规格型号*/
|
||||||
|
private String specificationModel;
|
||||||
|
/**供应商*/
|
||||||
|
@Dict(dictTable = "nu_config_suppliers_info" , dicCode = "id" , dicText = "suppliers_name")
|
||||||
|
private String suppliers;
|
||||||
|
/**货品单位*/
|
||||||
|
private String materialUnits;
|
||||||
|
/**品牌型号*/
|
||||||
|
private String brandType;
|
||||||
|
/**生产厂家*/
|
||||||
|
private String manufacturer;
|
||||||
|
}
|
||||||
|
|
@ -103,4 +103,12 @@ public interface IInvoicingApi {
|
||||||
Map<String,Object> saveCgdInfo(String[] qgdIds);
|
Map<String,Object> saveCgdInfo(String[] qgdIds);
|
||||||
|
|
||||||
String querenOrZuofei(CgdMainEntity cgdMainEntityDto);
|
String querenOrZuofei(CgdMainEntity cgdMainEntityDto);
|
||||||
|
|
||||||
|
IPage<MaterialInfoEntity> getCkWlList(Page<MaterialInfoEntity> page, QueryWrapper<MaterialInfoEntity> queryWrapper);
|
||||||
|
|
||||||
|
InvoicingPddInfoEntity getPddInfoById(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||||
|
|
||||||
|
InvoicingPddInfoEntity savePddInfo(InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||||
|
|
||||||
|
void editXsjg(WarehouseMaterialInfoEntity warehouseMaterialInfoEntity);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,6 @@ public interface ConfigMaterialInfoMapper extends BaseMapper<ConfigMaterialInfo>
|
||||||
IPage<ConfigMaterialInfo> getNoSuplist(Page<ConfigMaterialInfo> page, @Param("params") ConfigMaterialInfo configMaterialInfo);
|
IPage<ConfigMaterialInfo> getNoSuplist(Page<ConfigMaterialInfo> page, @Param("params") ConfigMaterialInfo configMaterialInfo);
|
||||||
|
|
||||||
IPage<MaterialInfoEntity> wlShoppingList(Page<MaterialInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<MaterialInfoEntity> queryWrapper);
|
IPage<MaterialInfoEntity> wlShoppingList(Page<MaterialInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<MaterialInfoEntity> queryWrapper);
|
||||||
|
|
||||||
|
IPage<MaterialInfoEntity> getCkWlList(Page<MaterialInfoEntity> page, @Param(Constants.WRAPPER) QueryWrapper<MaterialInfoEntity> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -205,4 +205,15 @@
|
||||||
) a
|
) a
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getCkWlList" resultType="com.nu.entity.MaterialInfoEntity">
|
||||||
|
select a.id,a.create_time,a.nu_id,a.kcsl,a.dd_no,a.xsjg,a.xsdw,a.wl_id,
|
||||||
|
b.category_id,b.type_id,b.material_name,b.pinyin,b.material_no,b.specification_model,b.material_img,
|
||||||
|
c.procurement_price,c.arrival_price,c.suppliers_id,c.suppliers_name,c.wl_units,c.brand_type,c.manufacturer,c.id as cgdInfoId,c.cgd_id
|
||||||
|
from nu_warehouse_material_info a
|
||||||
|
left join nu_config_material_info b on a.wl_id = b.id
|
||||||
|
left join nu_invoicing_cgd_info c on a.cgd_info_id = c.id and a.wl_id = c.wl_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,12 @@ public class NuWarehouseMaterialCrkInfo implements Serializable {
|
||||||
private String crkStatus;
|
private String crkStatus;
|
||||||
|
|
||||||
private Double ddwNum;//多单位时的数量
|
private Double ddwNum;//多单位时的数量
|
||||||
|
private Double xzsl;//销账数量
|
||||||
|
private Double gzsl;//挂账数量
|
||||||
|
private String ddNo;//订单号
|
||||||
|
private String cgBy;//采购人
|
||||||
|
private String pddType;//盘点类型 1盘盈 2盘亏
|
||||||
|
|
||||||
|
|
||||||
/**物料类别名称*/
|
/**物料类别名称*/
|
||||||
@Excel(name = "物料类别名称", width = 15)
|
@Excel(name = "物料类别名称", width = 15)
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ import com.nu.modules.invoicing.api.IPddApi;
|
||||||
import com.nu.modules.nubaseinfo.entity.NuBaseInfo;
|
import com.nu.modules.nubaseinfo.entity.NuBaseInfo;
|
||||||
import com.nu.modules.nubaseinfo.mapper.NuBaseInfoMapper;
|
import com.nu.modules.nubaseinfo.mapper.NuBaseInfoMapper;
|
||||||
import com.nu.modules.order.api.IDirectiveOrderApi;
|
import com.nu.modules.order.api.IDirectiveOrderApi;
|
||||||
|
import com.nu.modules.pdd.entity.NuInvoicingPddInfo;
|
||||||
|
import com.nu.modules.pdd.mapper.NuInvoicingPddInfoMapper;
|
||||||
import com.nu.modules.qgd.entity.QgdInfo;
|
import com.nu.modules.qgd.entity.QgdInfo;
|
||||||
import com.nu.modules.qgd.mapper.QgdInfoMapper;
|
import com.nu.modules.qgd.mapper.QgdInfoMapper;
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
|
|
@ -126,6 +128,10 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
@Autowired
|
@Autowired
|
||||||
private RabbitMQUtil rabbitMQUtil;
|
private RabbitMQUtil rabbitMQUtil;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private NuInvoicingPddInfoMapper pddInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain) {
|
public void rukuInfo(NuInvoicingCgdMain nuInvoicingCgdMain) {
|
||||||
}
|
}
|
||||||
|
|
@ -1066,7 +1072,6 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
crkInfo.setCgdId(cgdInfo.getCgdId());
|
crkInfo.setCgdId(cgdInfo.getCgdId());
|
||||||
crkInfo.setNuId(cgdInfo.getNuId());
|
crkInfo.setNuId(cgdInfo.getNuId());
|
||||||
crkInfo.setWlId(cgdInfo.getWlId());
|
crkInfo.setWlId(cgdInfo.getWlId());
|
||||||
crkInfo.setCrkNum(jhNum);//出入库数量
|
|
||||||
crkInfo.setCrkType("1");//请购单类型 此处是固定的
|
crkInfo.setCrkType("1");//请购单类型 此处是固定的
|
||||||
crkInfo.setJhPic(jhPic);//拣货图片
|
crkInfo.setJhPic(jhPic);//拣货图片
|
||||||
crkInfo.setOldPrice(procurementPrice);//原来的价格(最开始的采购价格)
|
crkInfo.setOldPrice(procurementPrice);//原来的价格(最开始的采购价格)
|
||||||
|
|
@ -1090,9 +1095,12 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
crkInfo.setCrkStatus("1");
|
crkInfo.setCrkStatus("1");
|
||||||
dqkcl = kcsl + jhNum ;
|
dqkcl = kcsl + jhNum ;
|
||||||
rksl = rksl + jhNum;
|
rksl = rksl + jhNum;
|
||||||
|
crkInfo.setCrkNum(jhNum);//出入库数量
|
||||||
|
cgdInfo.setRksl(rksl);
|
||||||
}else if(StringUtils.equals("1",jhType)){//销账操作
|
}else if(StringUtils.equals("1",jhType)){//销账操作
|
||||||
crkInfo.setCrkStatus("2");
|
crkInfo.setCrkStatus("2");
|
||||||
xzsl = xzsl + jhNum;
|
xzsl = xzsl + jhNum;
|
||||||
|
crkInfo.setCrkNum(0.0);//出入库数量
|
||||||
}
|
}
|
||||||
crkInfo.setDqkcl(dqkcl);//当前库存量(操作后的库存量)
|
crkInfo.setDqkcl(dqkcl);//当前库存量(操作后的库存量)
|
||||||
|
|
||||||
|
|
@ -1130,9 +1138,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
crkInfo.setSpecificationModel(configMaterialInfo.getSpecificationModel());//规格型号
|
crkInfo.setSpecificationModel(configMaterialInfo.getSpecificationModel());//规格型号
|
||||||
crkInfo.setMaterialImg(configMaterialInfo.getMaterialImg());//物料图片
|
crkInfo.setMaterialImg(configMaterialInfo.getMaterialImg());//物料图片
|
||||||
crkInfo.setSalesUnitPrice(cgdInfo.getProcurementPrice());//销售单价
|
crkInfo.setSalesUnitPrice(cgdInfo.getProcurementPrice());//销售单价
|
||||||
if(crkInfo.getCrkNum()>0){
|
|
||||||
crkInfoMapper.insert(crkInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1142,9 +1148,17 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
//未入库数量 = 采购数量 - 入库数量 - 销账数量
|
//未入库数量 = 采购数量 - 入库数量 - 销账数量
|
||||||
wrksl = cgsl - rksl - xzsl;
|
wrksl = cgsl - rksl - xzsl;
|
||||||
cgdInfo.setWrksl(wrksl);
|
cgdInfo.setWrksl(wrksl);
|
||||||
cgdInfo.setRksl(rksl);
|
|
||||||
cgdInfo.setXzsl(xzsl);
|
cgdInfo.setXzsl(xzsl);
|
||||||
|
|
||||||
|
crkInfo.setGzsl(cgdInfo.getWrksl());
|
||||||
|
crkInfo.setXzsl(cgdInfo.getXzsl());
|
||||||
|
crkInfo.setDdNo(cgdMain.getCgdNo());
|
||||||
|
crkInfo.setCgBy(cgdMain.getQgBy());
|
||||||
|
// if(crkInfo.getCrkNum()>0){
|
||||||
|
crkInfoMapper.insert(crkInfo);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**单据状态 0待入库 1挂账中 2已入库 3已销账*/
|
/**单据状态 0待入库 1挂账中 2已入库 3已销账*/
|
||||||
//判断是否是销账操作,不是销账的话
|
//判断是否是销账操作,不是销账的话
|
||||||
if(StringUtils.equals("3",cgdInfo.getStatus())){
|
if(StringUtils.equals("3",cgdInfo.getStatus())){
|
||||||
|
|
@ -1420,10 +1434,11 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
QueryWrapper<NuWarehouseMaterialCrkInfo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<NuWarehouseMaterialCrkInfo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("wl_id",nuWarehouseMaterialCrkInfo.getWlId());
|
queryWrapper.eq("wl_id",nuWarehouseMaterialCrkInfo.getWlId());
|
||||||
queryWrapper.eq("nu_id",nuWarehouseMaterialCrkInfo.getNuId());
|
queryWrapper.eq("nu_id",nuWarehouseMaterialCrkInfo.getNuId());
|
||||||
|
queryWrapper.eq("cgd_id",nuWarehouseMaterialCrkInfo.getCgdId());
|
||||||
if(StringUtils.isNotBlank(crkInfoEntity.getCrkStatus())){
|
if(StringUtils.isNotBlank(crkInfoEntity.getCrkStatus())){
|
||||||
queryWrapper.in("crk_status",crkInfoEntity.getCrkStatus());
|
queryWrapper.in("crk_status",crkInfoEntity.getCrkStatus());
|
||||||
}else{
|
// }else{
|
||||||
queryWrapper.in("crk_status",1,3);
|
// queryWrapper.in("crk_status",1,3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.equals("asc",colomnDesc)){
|
if(StringUtils.equals("asc",colomnDesc)){
|
||||||
|
|
@ -1735,4 +1750,91 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
return "操作成功";
|
return "操作成功";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<MaterialInfoEntity> getCkWlList(Page<MaterialInfoEntity> page, QueryWrapper<MaterialInfoEntity> queryWrapper) {
|
||||||
|
return configMaterialInfoMapper.getCkWlList(page,queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InvoicingPddInfoEntity getPddInfoById(InvoicingPddInfoEntity invoicingPddInfoEntity) {
|
||||||
|
return pddInfoMapper.getPddInfoById(invoicingPddInfoEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InvoicingPddInfoEntity savePddInfo(InvoicingPddInfoEntity invoicingPddInfoEntity) {
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
String qgdDate = new SimpleDateFormat("yyyyMMdd").format(new Date());
|
||||||
|
String pddXlh = "";
|
||||||
|
if(redisUtil.get("PDD"+qgdDate) != null){
|
||||||
|
pddXlh = redisUtil.get("PDD"+qgdDate).toString();
|
||||||
|
}
|
||||||
|
int pddXlhInt = 0;
|
||||||
|
if(StringUtils.isNotBlank(pddXlh)){
|
||||||
|
pddXlhInt = Integer.parseInt(pddXlh);
|
||||||
|
}
|
||||||
|
NuInvoicingPddInfo pddInfo = new NuInvoicingPddInfo();
|
||||||
|
String pddNo = "P"+sysUser.getOrgCode()+qgdDate + String.format("%03d", pddXlhInt);
|
||||||
|
pddInfo.setPddNo(pddNo);
|
||||||
|
|
||||||
|
|
||||||
|
BlWarehouseMaterialInfo ckInfo = mterialInfoMapper.selectById(invoicingPddInfoEntity.getCkId());
|
||||||
|
pddInfo.setMaterialImg(ckInfo.getMaterialImg());
|
||||||
|
pddInfo.setMaterialName(ckInfo.getMaterialName());
|
||||||
|
pddInfo.setMaterialNo(ckInfo.getMaterialNo());
|
||||||
|
pddInfo.setMaterialUnits(ckInfo.getMaterialUnits());
|
||||||
|
pddInfo.setSpecificationModel(ckInfo.getSpecificationModel());
|
||||||
|
pddInfo.setCategoryName(ckInfo.getCategoryName());
|
||||||
|
pddInfo.setTypeName(ckInfo.getTypeName());
|
||||||
|
pddInfo.setMedicationName(ckInfo.getMedicationName());
|
||||||
|
pddInfo.setNuId(sysUser.getId());
|
||||||
|
pddInfo.setWlId(ckInfo.getWlId());
|
||||||
|
pddInfo.setDqkcsl(ckInfo.getKcsl());
|
||||||
|
pddInfo.setPdsl(invoicingPddInfoEntity.getPdsl());
|
||||||
|
pddInfo.setCesl(invoicingPddInfoEntity.getCesl());
|
||||||
|
pddInfo.setPicPath(invoicingPddInfoEntity.getPicPath());
|
||||||
|
pddInfo.setCkId(invoicingPddInfoEntity.getCkId());
|
||||||
|
pddInfo.setContent(invoicingPddInfoEntity.getContent());
|
||||||
|
pddInfo.setPdType(invoicingPddInfoEntity.getPdType());
|
||||||
|
pddInfo.setNum(invoicingPddInfoEntity.getNum());
|
||||||
|
pddInfoMapper.insert(pddInfo);
|
||||||
|
pddXlhInt++;
|
||||||
|
redisUtil.set("PDD"+qgdDate,pddXlhInt);
|
||||||
|
|
||||||
|
//-------------------------记录出入库记录--------------------------
|
||||||
|
NuWarehouseMaterialCrkInfo crkInfo = new NuWarehouseMaterialCrkInfo();
|
||||||
|
crkInfo.setCreateBy(sysUser.getRealname());
|
||||||
|
crkInfo.setCgdId(pddInfo.getId());
|
||||||
|
crkInfo.setNuId(pddInfo.getNuId());
|
||||||
|
crkInfo.setWlId(pddInfo.getWlId());
|
||||||
|
crkInfo.setCrkType("1");//请购单类型 此处是固定的
|
||||||
|
crkInfo.setJhPic(pddInfo.getPicPath());//拣货图片
|
||||||
|
crkInfo.setCzqkcl(pddInfo.getDqkcsl());//操作前库存量
|
||||||
|
crkInfo.setDdwNum(pddInfo.getPdsl());//多单位时的数量
|
||||||
|
crkInfo.setContent("盘点单:"+pddNo);
|
||||||
|
crkInfo.setMaterialCategoryName(pddInfo.getCategoryName());//物料类别名称
|
||||||
|
crkInfo.setMaterialTypeName(pddInfo.getTypeName());//物料类型名称
|
||||||
|
crkInfo.setMaterialMedicationName(pddInfo.getMedicationName());//物料类型名称
|
||||||
|
crkInfo.setMaterialName(pddInfo.getMaterialName());//物料名称
|
||||||
|
crkInfo.setMaterialUnits(pddInfo.getMaterialUnits());//物料单位
|
||||||
|
crkInfo.setMaterialNo(pddInfo.getMaterialNo());//物料编码
|
||||||
|
crkInfo.setSpecificationModel(pddInfo.getSpecificationModel());//规格型号
|
||||||
|
crkInfo.setMaterialImg(pddInfo.getMaterialImg());//物料图片
|
||||||
|
crkInfo.setSalesUnitPrice(new BigDecimal(ckInfo.getXsjg()));//销售单价
|
||||||
|
crkInfo.setCrkNum(pddInfo.getCesl());
|
||||||
|
crkInfo.setDdNo(pddNo);
|
||||||
|
crkInfo.setCgBy(sysUser.getRealname());
|
||||||
|
crkInfoMapper.insert(crkInfo);
|
||||||
|
//-------------------------记录出入库记录--------------------------
|
||||||
|
|
||||||
|
BeanUtils.copyProperties(pddInfo, invoicingPddInfoEntity);
|
||||||
|
return invoicingPddInfoEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editXsjg(WarehouseMaterialInfoEntity warehouseMaterialInfoEntity) {
|
||||||
|
BlWarehouseMaterialInfo materialInfo = new BlWarehouseMaterialInfo();
|
||||||
|
BeanUtils.copyProperties(warehouseMaterialInfoEntity, materialInfo);
|
||||||
|
mterialInfoMapper.updateById(materialInfo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,94 +34,58 @@ public class NuInvoicingPddInfo implements Serializable {
|
||||||
|
|
||||||
/**id*/
|
/**id*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@ApiModelProperty(value = "id")
|
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
/**createBy*/
|
/**createBy*/
|
||||||
@ApiModelProperty(value = "createBy")
|
|
||||||
private java.lang.String createBy;
|
private java.lang.String createBy;
|
||||||
/**createTime*/
|
/**createTime*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "createTime")
|
|
||||||
private java.util.Date createTime;
|
private java.util.Date createTime;
|
||||||
/**updateBy*/
|
/**updateBy*/
|
||||||
@ApiModelProperty(value = "updateBy")
|
|
||||||
private java.lang.String updateBy;
|
private java.lang.String updateBy;
|
||||||
/**updateTime*/
|
/**updateTime*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@ApiModelProperty(value = "updateTime")
|
|
||||||
private java.util.Date updateTime;
|
private java.util.Date updateTime;
|
||||||
/**盘点单id*/
|
|
||||||
@Excel(name = "盘点单id", width = 15, dictTable = "nu_invoicing_pdd_main", dicText = "pdd_no", dicCode = "id")
|
|
||||||
@Dict(dictTable = "nu_invoicing_pdd_main", dicText = "pdd_no", dicCode = "id")
|
|
||||||
@ApiModelProperty(value = "盘点单id")
|
|
||||||
private java.lang.String pddId;
|
|
||||||
/**库房id*/
|
/**库房id*/
|
||||||
@Excel(name = "库房id", width = 15)
|
|
||||||
@ApiModelProperty(value = "库房id")
|
|
||||||
private java.lang.String nuId;
|
private java.lang.String nuId;
|
||||||
/**物料id*/
|
/**物料id*/
|
||||||
@Excel(name = "物料id", width = 15)
|
|
||||||
@ApiModelProperty(value = "物料id")
|
|
||||||
private java.lang.String wlId;
|
private java.lang.String wlId;
|
||||||
/**当前库存数量*/
|
/**当前库存数量*/
|
||||||
@Excel(name = "当前库存数量", width = 15)
|
|
||||||
@ApiModelProperty(value = "当前库存数量")
|
|
||||||
private java.lang.Double dqkcsl;
|
private java.lang.Double dqkcsl;
|
||||||
/**盘点数量*/
|
/**盘点数量*/
|
||||||
@Excel(name = "盘点数量", width = 15)
|
|
||||||
@ApiModelProperty(value = "盘点数量")
|
|
||||||
private java.lang.Double pdsl;
|
private java.lang.Double pdsl;
|
||||||
/**差额数量*/
|
/**差额数量*/
|
||||||
@Excel(name = "差额数量", width = 15)
|
|
||||||
@ApiModelProperty(value = "差额数量")
|
|
||||||
private java.lang.Double cesl;
|
private java.lang.Double cesl;
|
||||||
/**盘点类型 1盘盈单 2盘亏单 3作废*/
|
/**盘点类型 1盘盈单 2盘亏单 3作废*/
|
||||||
@Excel(name = "盘点类型 1盘盈单 2盘亏单 3作废", width = 15)
|
|
||||||
@ApiModelProperty(value = "盘点类型 1盘盈单 2盘亏单 3作废")
|
|
||||||
@Dict(dicCode = "pd_type")
|
@Dict(dicCode = "pd_type")
|
||||||
private java.lang.String pdType;
|
private java.lang.String pdType;
|
||||||
/**备注信息*/
|
/**备注信息*/
|
||||||
@Excel(name = "备注信息", width = 15)
|
|
||||||
@ApiModelProperty(value = "备注信息")
|
|
||||||
private java.lang.String content;
|
private java.lang.String content;
|
||||||
/**拍照图片*/
|
/**拍照图片*/
|
||||||
@Excel(name = "拍照图片", width = 15)
|
|
||||||
@ApiModelProperty(value = "拍照图片")
|
|
||||||
private java.lang.String picPath;
|
private java.lang.String picPath;
|
||||||
/**物料类别*/
|
/**物料类别*/
|
||||||
@Excel(name = "物料类别", width = 15)
|
|
||||||
@ApiModelProperty(value = "物料类别")
|
|
||||||
private java.lang.String categoryName;
|
private java.lang.String categoryName;
|
||||||
/**物料类型*/
|
/**物料类型*/
|
||||||
@Excel(name = "物料类型", width = 15)
|
|
||||||
@ApiModelProperty(value = "物料类型")
|
|
||||||
private java.lang.String typeName;
|
private java.lang.String typeName;
|
||||||
/**用药类型*/
|
/**用药类型*/
|
||||||
@Excel(name = "用药类型", width = 15)
|
|
||||||
@ApiModelProperty(value = "用药类型")
|
|
||||||
private java.lang.String medicationName;
|
private java.lang.String medicationName;
|
||||||
/**货品名称*/
|
/**货品名称*/
|
||||||
@Excel(name = "货品名称", width = 15)
|
|
||||||
@ApiModelProperty(value = "货品名称")
|
|
||||||
private java.lang.String materialName;
|
private java.lang.String materialName;
|
||||||
/**货品编码*/
|
/**货品编码*/
|
||||||
@Excel(name = "货品编码", width = 15)
|
|
||||||
@ApiModelProperty(value = "货品编码")
|
|
||||||
private java.lang.String materialNo;
|
private java.lang.String materialNo;
|
||||||
/**规格型号*/
|
/**规格型号*/
|
||||||
@Excel(name = "规格型号", width = 15)
|
|
||||||
@ApiModelProperty(value = "规格型号")
|
|
||||||
private java.lang.String specificationModel;
|
private java.lang.String specificationModel;
|
||||||
/**物料图片*/
|
/**物料图片*/
|
||||||
@Excel(name = "物料图片", width = 15)
|
|
||||||
@ApiModelProperty(value = "物料图片")
|
|
||||||
private java.lang.String materialImg;
|
private java.lang.String materialImg;
|
||||||
/**货品单位*/
|
/**货品单位*/
|
||||||
@Excel(name = "货品单位", width = 15)
|
|
||||||
@ApiModelProperty(value = "货品单位")
|
|
||||||
private java.lang.String materialUnits;
|
private java.lang.String materialUnits;
|
||||||
|
/**盘点单号*/
|
||||||
|
private java.lang.String pddNo;
|
||||||
|
/**库存id*/
|
||||||
|
private java.lang.String ckId;
|
||||||
|
|
||||||
|
private String pddId;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.Integer num;
|
private java.lang.Integer num;
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,6 @@ public interface NuInvoicingPddInfoMapper extends BaseMapper<NuInvoicingPddInfo>
|
||||||
List<NuInvoicingPddInfo> selectPydPkdList(@Param("pddId")String pddId);
|
List<NuInvoicingPddInfo> selectPydPkdList(@Param("pddId")String pddId);
|
||||||
|
|
||||||
List<NuInvoicingPddInfo> queryPddStartByList(@Param("params") InvoicingPddInfoEntity invoicingPddInfoEntity);
|
List<NuInvoicingPddInfo> queryPddStartByList(@Param("params") InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||||
|
|
||||||
|
InvoicingPddInfoEntity getPddInfoById(@Param("params") InvoicingPddInfoEntity invoicingPddInfoEntity);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,4 +32,9 @@
|
||||||
<select id="queryPddStartByList" resultType="com.nu.modules.pdd.entity.NuInvoicingPddInfo">
|
<select id="queryPddStartByList" resultType="com.nu.modules.pdd.entity.NuInvoicingPddInfo">
|
||||||
select pdd_start_by as create_by from nu_invoicing_pdd_main where nu_id = #{params.nuId} GROUP BY pdd_start_by
|
select pdd_start_by as create_by from nu_invoicing_pdd_main where nu_id = #{params.nuId} GROUP BY pdd_start_by
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getPddInfoById" resultType="com.nu.entity.InvoicingPddInfoEntity">
|
||||||
|
select * from nu_invoicing_pdd_info where ck_id = #{params.ckId} ORDER BY create_time desc limit 1
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue