Commit ac1f0358 by 李小惠

修改OAbug

parent 98ecfe55
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -132,4 +132,6 @@ public class OrderDto implements Serializable {
//计划子单json
private String eqsJson;
private Date createTime;
}
......@@ -116,5 +116,7 @@ public class OrderMainDto implements Serializable {
//计划子单json
private String eqsJson;
private Date createTime;
}
......@@ -17,13 +17,18 @@ public class DetailJsonReq {
private String sizeId;
private String sizeName;
private Integer modifyQuantity;
//单价
private BigDecimal price;
//单价
private BigDecimal unitPrice;
//Epc类型(0固定资产1库存物资非固定资产)
private Integer property;
private Integer maintenancePeriod;
private Integer warrantyPeriod;
private Date productionDate;
// private List<InventoryReq> InfoList;
}
......@@ -265,6 +265,9 @@ public class BusFormServiceImpl extends ServiceImpl<BusFormMapper, BusForm> impl
startProcessInstanceDTO.setType("busFormDto");
// Object A= JSON.toJSONString(req);
if (ObjectUtil.isNotNull(req.getType())){
req.setType("busFormDto");
}
Object A= JSON.toJSONString(req, SerializerFeature.WriteDateUseDateFormat);
JSONObject jsonObject = JSON.parseObject(A.toString());
......
......@@ -994,6 +994,10 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
Date productionDate=ObjectUtil.isNull(detailJsonReq.getProductionDate())?DateTimeUtil.DateByDays():DateTimeUtil.DaysToZero(detailJsonReq.getProductionDate());
String sizeId=ObjectUtil.isNull(detailJsonReq.getSizeId())? uploadDetailReq.getSizeId():detailJsonReq.getSizeId();
String typeId=ObjectUtil.isNull(detailJsonReq.getTypeId())? uploadDetailReq.getTypeId():detailJsonReq.getTypeId();
if (subNum>0){
//判断是否存在仓库id的key,如果存在直接获取并且修改后再次添加,如果不存在则直接put
if (logMap.containsKey(detailJsonReq.getLocationId())){
......@@ -1014,8 +1018,8 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
Inventory inventory = new Inventory();
inventory.setEpc(epc);
inventory.setLocationId(detailJsonReq.getLocationId());
inventory.setSizeId(ObjectUtil.isNull(detailJsonReq.getSizeId())? uploadDetailReq.getSizeId():detailJsonReq.getSizeId());
inventory.setTypeId(ObjectUtil.isNull(detailJsonReq.getTypeId())? uploadDetailReq.getTypeId():detailJsonReq.getTypeId());
inventory.setSizeId(sizeId);
inventory.setTypeId(typeId);
inventory.setOrgId(orderMain.getEndOrgId());
inventory.setLocationType(0);
inventory.setPrice(ObjectUtil.isNull(detailJsonReq.getPrice())?price:detailJsonReq.getPrice());
......@@ -1023,7 +1027,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
inventory.setState("normal");
inventory.setBussinessState("normal");
inventory.setCreateTime(DateTimeUtil.getCurrentDateTime());
inventory.setProductionDate(ObjectUtil.isNull(detailJsonReq.getProductionDate())?DateTimeUtil.DateByDays():DateTimeUtil.DaysToZero(detailJsonReq.getProductionDate()));
inventory.setProductionDate(productionDate);
inventory.setWarrantyPeriod(ObjectUtil.isNull(detailJsonReq.getWarrantyPeriod())?12:detailJsonReq.getWarrantyPeriod());
inventory.setMaintenancePeriod(ObjectUtil.isNull(detailJsonReq.getMaintenancePeriod())?12:detailJsonReq.getMaintenancePeriod());
inventory.setTypeName(uploadDetailReq.getTypeName());
......@@ -1036,8 +1040,8 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
warehouseInventory.setOrgId(orderMain.getEndOrgId());
warehouseInventory.setEpc(epc);
warehouseInventory.setLocationId(detailJsonReq.getLocationId());
warehouseInventory.setTypeId(ObjectUtil.isNull(detailJsonReq.getTypeId())? uploadDetailReq.getTypeId():detailJsonReq.getTypeId());
warehouseInventory.setSizeId(ObjectUtil.isNull(detailJsonReq.getSizeId())? uploadDetailReq.getSizeId():detailJsonReq.getSizeId());
warehouseInventory.setTypeId(typeId);
warehouseInventory.setSizeId(sizeId);
warehouseInventory.setLocationType("0");
warehouseInventory.setLocationState("in");
warehouseInventory.setCreateTime(DateTimeUtil.getCurrentDateTime());
......@@ -1050,8 +1054,8 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
}
else {//出库
//需要先根据创建的单子进行查询,再随机将两个进行设置为出库
List<Inventory> eqsList=inventoryMapper.getEqsInfo(orgId,detailJsonReq.getLocationId(),detailJsonReq.getTypeId(),
detailJsonReq.getSizeId(),detailJsonReq.getPrice(),detailJsonReq.getWarrantyPeriod(),
List<Inventory> eqsList=inventoryMapper.getEqsInfo(orgId,detailJsonReq.getLocationId(),typeId,
sizeId,detailJsonReq.getUnitPrice(),detailJsonReq.getWarrantyPeriod(),
DateTimeUtil.DaysToZero(detailJsonReq.getProductionDate()),DateTimeUtil.setTimeToMax(detailJsonReq.getProductionDate()));
for (int i = 0; i < subNum; i++) {
......@@ -1139,7 +1143,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
for (int i = 0; i < updateInvList.size(); i++) {
Inventory updateInv = updateInvList.get(i);
wp1.eq(Inventory::getId, updateInv.getId());
wp2.eq(WarehouseInventory::getLocationId, updateInv.getInventoryId());
wp2.eq(WarehouseInventory::getId, updateInv.getInventoryId());
if (i < updateInvList.size()-1){
wp1.or();
wp2.or();
......
......@@ -190,12 +190,12 @@ public class StocktakeServiceImpl extends ServiceImpl<StocktakeMapper, Stocktake
.eq(OrderNum::getOrgId, orderNum.getOrgId())
.eq(OrderNum::getBussinessType, orderNum.getBussinessType())
.eq(OrderNum::getYear, orderNum.getYear()));
OrderNum one = new OrderNum();
OrderNum one = null;
if (CollectionUtil.isNotEmpty(list)){
one=list.get(0);
}
//设置num的数量
if (one != null){
if (ObjectUtil.isNull(one)){
orderNum.setNum(1);
orderNumService.save(orderNum);
return orderNum;
......
......@@ -415,7 +415,7 @@ public class TjServiceImpl implements TjService {
req.setColumn(req.getColumn().equals("createTime")
? null : req.getColumn().replaceAll("[A-Z]", "_$0").toLowerCase());
req.setOrder((req.getOrder().equals("desc")||req.getOrder().equals("asc"))
? null : req.getOrder().toLowerCase());
? req.getOrder().toLowerCase() :null );
List<InventorySumDto> returnList=inventorySummaryMapper.TjOrgEqsDetail(req.getOrgId(),req.getTypeIdsList(),
req.getSizeNameList(),req.getColumn(),req.getOrder());
return returnList;
......
......@@ -94,7 +94,7 @@ public class DateTimeUtil {
return format1;
}
//获取当前时间年月日,时分秒都为0
//获取当前时间年月日,时分秒都为0(获取当前时间)
public static Date DateByDays(){
LocalDate today = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
......@@ -110,7 +110,7 @@ public class DateTimeUtil {
return date;
}
//将时分秒转成00:00:00
//将时分秒转成00:00:00(根据指定时间进行传递返回)
public static Date DaysToZero(Date time){
// 将Date转换为Instant
......
......@@ -36,7 +36,7 @@ knife4j:
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
url: jdbc:mysql://192.168.1.128:3306/db_jyzb_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: root
password: 123456
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论