Commit ee0c4727 by 李小惠

修改基础信息存在的问题,新增号型标签类型参数

parent b2d73920
...@@ -81,4 +81,7 @@ public class EquipmentSizeDto { ...@@ -81,4 +81,7 @@ public class EquipmentSizeDto {
private String maintenancePeriod; private String maintenancePeriod;
private String warrantyPeriod; private String warrantyPeriod;
//EPc类型,1,单标签,2双标签,3三标签,往后递推
private Integer epcType;
} }
...@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor; ...@@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -24,6 +25,7 @@ public class EquipmentTypeDto { ...@@ -24,6 +25,7 @@ public class EquipmentTypeDto {
private Boolean isLeaf; private Boolean isLeaf;
private List<String> supplierList; private List<String> supplierList;
private String photo; private String photo;
private BigDecimal price;
private Integer childCount; private Integer childCount;
private List<EquipmentTypeDto> children = new ArrayList<>(); private List<EquipmentTypeDto> children = new ArrayList<>();
......
...@@ -31,4 +31,6 @@ public class UpdateEquipmentSizeReq { ...@@ -31,4 +31,6 @@ public class UpdateEquipmentSizeReq {
private String instructions; private String instructions;
private Long updateTime; private Long updateTime;
//EPc类型,1,单标签,2双标签,3三标签,往后递推
private Integer epcType;
} }
...@@ -5,6 +5,7 @@ import lombok.Data; ...@@ -5,6 +5,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -39,4 +40,8 @@ public class UpdateEquipmentTypeReq { ...@@ -39,4 +40,8 @@ public class UpdateEquipmentTypeReq {
private List<String> supplierList; private List<String> supplierList;
private Long updateTime; private Long updateTime;
private BigDecimal price;
private Integer epcType;
} }
...@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; ...@@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
...@@ -123,6 +124,9 @@ public class EquipmentType implements Serializable { ...@@ -123,6 +124,9 @@ public class EquipmentType implements Serializable {
@ApiModelProperty(value = "物资阈值") @ApiModelProperty(value = "物资阈值")
private Integer threshold; private Integer threshold;
@ApiModelProperty(value = "单价")
private BigDecimal price;
......
...@@ -16,10 +16,7 @@ import com.junmp.jyzb.api.exception.enums.EquipmentExceptionEnum; ...@@ -16,10 +16,7 @@ import com.junmp.jyzb.api.exception.enums.EquipmentExceptionEnum;
import com.junmp.jyzb.entity.*; import com.junmp.jyzb.entity.*;
import com.junmp.jyzb.mapper.EquipmentCountSummaryMapper; import com.junmp.jyzb.mapper.EquipmentCountSummaryMapper;
import com.junmp.jyzb.mapper.PriceSumSummaryMapper; import com.junmp.jyzb.mapper.PriceSumSummaryMapper;
import com.junmp.jyzb.service.EquipmentTypeService; import com.junmp.jyzb.service.*;
import com.junmp.jyzb.service.InventorySummaryService;
import com.junmp.jyzb.service.SupplierService;
import com.junmp.jyzb.service.SupplierTypeService;
import com.junmp.jyzb.utils.*; import com.junmp.jyzb.utils.*;
import com.junmp.v2.common.exception.base.ServiceException; import com.junmp.v2.common.exception.base.ServiceException;
import com.junmp.v2.common.util.BeanPlusUtil; import com.junmp.v2.common.util.BeanPlusUtil;
...@@ -55,6 +52,9 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E ...@@ -55,6 +52,9 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
private PriceSumSummaryMapper priceSumSummaryMapper; private PriceSumSummaryMapper priceSumSummaryMapper;
@Resource @Resource
private EquipmentCountSummaryMapper equipmentCountSummaryMapper; private EquipmentCountSummaryMapper equipmentCountSummaryMapper;
@Resource
private EquipmentSizeService equipmentSizeService;
private static final String REDIS_TYPE = "Type_"; private static final String REDIS_TYPE = "Type_";
private List<EquipmentTypeDto> typeDto; private List<EquipmentTypeDto> typeDto;
private ArrayList<String> ids; private ArrayList<String> ids;
...@@ -149,8 +149,12 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E ...@@ -149,8 +149,12 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public Boolean updateEquipment(UpdateEquipmentTypeReq req) { public Boolean updateEquipment(UpdateEquipmentTypeReq req) {
if (req.getEpcType()!=null){
equipmentSizeService.update(new LambdaUpdateWrapper<EquipmentSize>()
.set(EquipmentSize::getEpcType,req.getEpcType())
.eq(EquipmentSize::getTypeId,req.getId()));
}
EquipmentType type = this.queryEqType(req); EquipmentType type = this.queryEqType(req);
List<String> chekResult = supplierService.CheckSupplierList(req.getSupplierList()); List<String> chekResult = supplierService.CheckSupplierList(req.getSupplierList());
if (chekResult.size() == 0) { if (chekResult.size() == 0) {
// 先增加code码 // 先增加code码
......
...@@ -361,7 +361,6 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory ...@@ -361,7 +361,6 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
//新增一条数据 //新增一条数据
InventorySummary inventorySummary = new InventorySummary(); InventorySummary inventorySummary = new InventorySummary();
BeanPlusUtil.copyProperties(req,inventorySummary); BeanPlusUtil.copyProperties(req,inventorySummary);
is.setValuekey(pubOrg.getOrgCode()+req.getTypeId()+req.getSizeId()+req.getLocationId()+req.getPrice());
inventorySummary.setValuekey(pubOrg.getOrgCode()+req.getLocationId()+req.getTypeId()+req.getSizeId()+req.getPrice()); inventorySummary.setValuekey(pubOrg.getOrgCode()+req.getLocationId()+req.getTypeId()+req.getSizeId()+req.getPrice());
inventorySummary.setOrgName(pubOrg.getOrgName()); inventorySummary.setOrgName(pubOrg.getOrgName());
inventorySummary.setOrgCode(pubOrg.getOrgCode()); inventorySummary.setOrgCode(pubOrg.getOrgCode());
...@@ -395,11 +394,12 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory ...@@ -395,11 +394,12 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
is.setPrice(is.getUnitPrice().multiply(BigDecimal.valueOf(is.getNumber()))); is.setPrice(is.getUnitPrice().multiply(BigDecimal.valueOf(is.getNumber())));
} }
} }
inventorySummaryService.updateBatchById(inventorySummaryList);
}
if (CollectionUtil.isNotEmpty(delList)){ if (CollectionUtil.isNotEmpty(delList)){
inventorySummaryService.removeBatchByIds(delList); inventorySummaryService.removeBatchByIds(delList);
} }
inventorySummaryService.updateBatchById(inventorySummaryList);
}
} }
List<Inventory> list = list(new LambdaQueryWrapper<Inventory>().in(Inventory::getId, req.getInventoryIdList())); List<Inventory> list = list(new LambdaQueryWrapper<Inventory>().in(Inventory::getId, req.getInventoryIdList()));
......
...@@ -196,6 +196,8 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm ...@@ -196,6 +196,8 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
c1 = warehouseInventoryService.saveBatch(warehouseInventoryList); c1 = warehouseInventoryService.saveBatch(warehouseInventoryList);
c=inventoryService.saveBatch(collect1); c=inventoryService.saveBatch(collect1);
} }
} }
//3.处理出入库记录对象 //3.处理出入库记录对象
...@@ -222,6 +224,8 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm ...@@ -222,6 +224,8 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
// 对出入库记录进行分类汇总存储() // 对出入库记录进行分类汇总存储()
public List<NormalInOutDto> saveInOutRecords(OutInLogsReq req) { public List<NormalInOutDto> saveInOutRecords(OutInLogsReq req) {
//返回结果,用于日常出入库时计算更新库存汇总表 //返回结果,用于日常出入库时计算更新库存汇总表
List<SummaryLogReq> logSummaryList = req.getLogList(); List<SummaryLogReq> logSummaryList = req.getLogList();
...@@ -265,9 +269,9 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm ...@@ -265,9 +269,9 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
normalInOutDto.setOutInState(logSummary.getOutInState()); normalInOutDto.setOutInState(logSummary.getOutInState());
returnList.add(normalInOutDto); returnList.add(normalInOutDto);
} }
//判断logSummary是否为采购 //判断logSummary是否为采购,快速移库,和领用出库
//如果是采购则不处理,因为采购的inventory是跟着单子来处理的,其他的单子直接根据出入库记录来处理 //如果是采购则不处理,因为采购的inventory是跟着单子来处理的,其他的单子直接根据出入库记录来处理
if (!logreq.getBussinessType().equals("purchase")){ if (!logreq.getBussinessType().equals("purchase") && !logreq.getBussinessType().equals("quick") && !logreq.getBussinessType().equals("use")){
// if (logreq.getOutInState().equals("in")){ // if (logreq.getOutInState().equals("in")){
Inventory inventory = saveInventory(logreq.getOrgId(),logreq.getLocationId(),logreq,detailLogReq, map, logSummary.getOutInState()); Inventory inventory = saveInventory(logreq.getOrgId(),logreq.getLocationId(),logreq,detailLogReq, map, logSummary.getOutInState());
inventoryList.add(inventory); inventoryList.add(inventory);
...@@ -278,6 +282,10 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm ...@@ -278,6 +282,10 @@ public class LogSummaryServiceImpl extends ServiceImpl<LogSummaryMapper, LogSumm
// } // }
} }
//如果是快速移库,那么直接将物资的locationId进行修改
if(logreq.getBussinessType().equals("quick")){
}
//存放logdetail信息 //存放logdetail信息
LogDetail logDetail = new LogDetail(); LogDetail logDetail = new LogDetail();
BeanPlusUtil.copyProperties(detailLogReq, logDetail); BeanPlusUtil.copyProperties(detailLogReq, logDetail);
......
...@@ -831,10 +831,10 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem ...@@ -831,10 +831,10 @@ public class PubOrgServiceImpl extends ServiceImpl<PubOrgMapper, PubOrg> implem
//修改组织机构信息 //修改组织机构信息
@Override @Override
public boolean updatePubOrg(UpdateOrgReq req) { public boolean updatePubOrg(UpdateOrgReq req) {
List<PubOrg> list = list(new LambdaQueryWrapper<PubOrg>().eq(PubOrg::getOrgName, req.getOrgName())); // List<PubOrg> list = list(new LambdaQueryWrapper<PubOrg>().eq(PubOrg::getOrgName, req.getOrgName()));
if (list.size()>0){ // if (list.size()>0){
throw new ServiceException(PubOrgExceptionEnum.ORG_IS_EXIST); // throw new ServiceException(PubOrgExceptionEnum.ORG_IS_EXIST);
} // }
PubOrg pubOrg = new PubOrg(); PubOrg pubOrg = new PubOrg();
BeanPlusUtil.copyProperties(req,pubOrg); BeanPlusUtil.copyProperties(req,pubOrg);
return updateById(pubOrg); return updateById(pubOrg);
......
...@@ -164,14 +164,14 @@ ...@@ -164,14 +164,14 @@
FROM vie_price_sum_summary vpss FROM vie_price_sum_summary vpss
left join pub_org po on vpss.org_id_int=po.org_id left join pub_org po on vpss.org_id_int=po.org_id
where vpss.`year`= #{year} and po.del_flag=1 where vpss.`year`= #{year} and po.del_flag=1
AND (po.org_id = org_id_param OR (`po`.org_parent_ids like CONCAT('%', org_id_param, '%') AND (po.org_id = #{orgId} OR (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
AND(case when #{levelFlag} >=3 then 1=1 else SUBSTRING(`po`.`org_code`, 5, 2) = '00' end )) AND(case when #{levelFlag} >=3 then 1=1 else SUBSTRING(`po`.`org_code`, 5, 2) = '00' end ))
AND ( AND (
`po`.`level_flag` > ( `po`.`level_flag` > (
SELECT `level_flag` FROM `pub_org` WHERE `org_id` = org_id_param SELECT `level_flag` FROM `pub_org` WHERE `org_id` = #{orgId}
) + 1 ) + 1
OR (`po`.`level_flag` = ( OR (`po`.`level_flag` = (
SELECT `level_flag` FROM `pub_org` WHERE `org_id` = org_id_param SELECT `level_flag` FROM `pub_org` WHERE `org_id` = #{orgId}
)))) ))))
<if test="typeIdsList!=null and typeIdsList.size() > 0"> <if test="typeIdsList!=null and typeIdsList.size() > 0">
and type_id in and type_id in
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论