mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
打包接口参数修改,工序加工bug修改
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
package com.cf.imes.module.executor.controller.admin.orderParts.vo;
|
||||
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -11,7 +12,7 @@ import lombok.NoArgsConstructor;
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderPartsRemark {
|
||||
public class OrderPartsRemark extends ESDocument {
|
||||
|
||||
@Schema(description = "配件 ID")
|
||||
private Long partsId;
|
||||
|
||||
+27
@@ -4,6 +4,7 @@ import co.elastic.clients.elasticsearch.core.BulkResponse;
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.es.core.service.ESDocumentService;
|
||||
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsRemark;
|
||||
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
|
||||
@@ -80,6 +81,9 @@ public class OrderInputProcessor {
|
||||
|
||||
public static final String ORDER_PLATE_MODEL = "imes_order_plate_model";
|
||||
|
||||
|
||||
public static final String ORDER_PARTS_REMARK_MODEL = "imes_order_parts_remark_model";
|
||||
|
||||
/**
|
||||
* 批量保存生产单小板五金数据
|
||||
*
|
||||
@@ -170,4 +174,27 @@ public class OrderInputProcessor {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存生产单配件备注数据
|
||||
*
|
||||
* @param orderPartsRemarks
|
||||
*/
|
||||
public void batchSaveOrderPartsModel(List<OrderPartsRemark> orderPartsRemarks) {
|
||||
try {
|
||||
BulkResponse bulkResponse = esDocumentService.bulkCreate(ORDER_PARTS_REMARK_MODEL, orderPartsRemarks);
|
||||
boolean errors = bulkResponse.errors();
|
||||
if (errors) {
|
||||
log.error(bulkResponse.items().toString());
|
||||
throw new ServiceException(500, "未知异常");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+21
-21
@@ -146,19 +146,6 @@ public class PackController {
|
||||
|
||||
|
||||
|
||||
@PutMapping("/updateParts")
|
||||
@Operation(summary = "更新配件")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:updateParts')")
|
||||
public CommonResult<Boolean> updateParts(@Valid @RequestBody OrderPartsReqVO reqVO) {
|
||||
|
||||
packService.updateParts(reqVO);
|
||||
|
||||
return success(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -178,9 +165,9 @@ public class PackController {
|
||||
|
||||
|
||||
|
||||
@PostMapping("/insertPack")
|
||||
@Operation(summary = "新增包裹")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:insertPack')")
|
||||
// @PostMapping("/insertPack")
|
||||
// @Operation(summary = "新增包裹")
|
||||
// @PreAuthorize("@ss.hasPermission('manage:pack:insertPack')")
|
||||
public CommonResult<OrderPackRespVO> insertPack(@Valid @RequestBody OrderPackReqVO packageVO) {
|
||||
|
||||
OrderPackageDO orderPackageDO = packService.insertPack(packageVO);
|
||||
@@ -193,7 +180,7 @@ public class PackController {
|
||||
|
||||
|
||||
@PutMapping("/updatePack")
|
||||
@Operation(summary = "更新包裹")
|
||||
@Operation(summary = "板材包裹更新-即封包")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:updatePack')")
|
||||
public CommonResult<OrderPackRespVO> updatePack(@Valid @RequestBody OrderPackReqVO packageVO) {
|
||||
OrderPackageDO orderPackageDO = packService.updatePack(packageVO);
|
||||
@@ -204,13 +191,27 @@ public class PackController {
|
||||
|
||||
|
||||
|
||||
@PutMapping("/updateParts")
|
||||
@Operation(summary = "配件包裹更新-即封包")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:updateParts')")
|
||||
public CommonResult<OrderPackRespVO> updateParts(@Valid @RequestBody OrderPartsReqVO reqVO) {
|
||||
|
||||
OrderPackageDO orderPackageDO = packService.updateParts(reqVO);
|
||||
|
||||
return success(BeanUtils.toBean(orderPackageDO, OrderPackRespVO.class));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/selectPack")
|
||||
@Operation(summary = "查询包裹")
|
||||
@Parameter(name = "orderId", description = "生产单Id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:update')")
|
||||
public CommonResult<List<OrderPackRespVO>> selectPack(@Valid @RequestParam("orderId") Long orderId) {
|
||||
|
||||
|
||||
return success(packService.selectPack(orderId));
|
||||
|
||||
}
|
||||
@@ -232,11 +233,10 @@ public class PackController {
|
||||
|
||||
@PutMapping("/unpacking")
|
||||
@Operation(summary = "拆包-更改包裹为未封包")
|
||||
@Parameter(name = "packageID", description = "包裹ID", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:unpacking')")
|
||||
public CommonResult<Boolean> unpacking(@Valid @RequestParam("packageID") Long packageID) {
|
||||
public CommonResult<Boolean> unpacking(@Valid @RequestBody PackingReqVO reqVO) {
|
||||
|
||||
packService.unpacking(packageID);
|
||||
packService.unpacking(reqVO.getPackageId());
|
||||
|
||||
return success(true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class OrderPackReqVO {
|
||||
|
||||
|
||||
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packageType;
|
||||
private Integer packageType;
|
||||
|
||||
//
|
||||
// @Schema(description = "包裹状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
+5
@@ -29,4 +29,9 @@ public class OrderPartsReqVO extends PageParam {
|
||||
@Schema(description = "更新配件时传-删除的配件ID")
|
||||
private List<Long> deletePartsList;
|
||||
|
||||
|
||||
@Schema(description = "新增的板件ID")
|
||||
private List<Long> addPlateIdList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ public class OrderPartsRespVO {
|
||||
|
||||
|
||||
@Schema(description = "配件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
private Long partsId;
|
||||
|
||||
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
+4
-4
@@ -62,20 +62,20 @@ public class PackRespVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "已打包数-包裹数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "已打包数-包裹数")
|
||||
private Long packCount;
|
||||
|
||||
|
||||
@Schema(description = "已打包片数-已处理量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "已打包片数-已处理量")
|
||||
private Long packPieceCount;
|
||||
|
||||
|
||||
@Schema(description = "总片数-板件总数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "总片数-板件总数")
|
||||
private Long totalPieceCount;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "待处理量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "待处理量")
|
||||
private Long pendingNum;
|
||||
|
||||
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.cf.imes.module.manage.controller.admin.pack.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 拆包")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PackingReqVO {
|
||||
|
||||
|
||||
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long packageId;
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class OrderPackageDO extends BaseDO {
|
||||
private String packageNo;
|
||||
|
||||
// 包裹类型,-1未定义,0板材,1配件,2其他配件
|
||||
private Long type;
|
||||
private Integer type;
|
||||
|
||||
// 包裹名
|
||||
private String name;
|
||||
|
||||
+9
@@ -4,6 +4,7 @@ package com.cf.imes.module.manage.dal.mysql.query;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.OrderPlateReqVO;
|
||||
import com.cf.imes.module.manage.controller.admin.process.vo.PlateDetails;
|
||||
@@ -13,6 +14,7 @@ import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.Orde
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
|
||||
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.PlatePageVO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderItemDO;
|
||||
import com.cf.imes.module.manage.dal.dataobject.query.OrderPackageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -75,4 +77,11 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
List<PlateDetails> selectPlateListByBodyIds( @Param("collect") List<Long> collect,@Param("orderId") Long orderId,@Param("userOrganId") Long userOrganId);
|
||||
|
||||
List<PlateDetailsRespVO> selectOrdersPlateList(@Param("orderIds") List<Long> orderIds, @Param("userOrganId") Long userOrganId);
|
||||
|
||||
|
||||
default List<OrderItemDO> selectPackList(Long packId, Long organId) {
|
||||
return selectList(new LambdaQueryWrapperX<OrderItemDO>()
|
||||
.eq(OrderItemDO::getOrganId, organId)
|
||||
.eqIfPresent(OrderItemDO::getPackageId, packId));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ public interface PackService {
|
||||
// 查看配件列表分页
|
||||
PageResult<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO);
|
||||
|
||||
void updateParts(OrderPartsReqVO reqVO);
|
||||
OrderPackageDO updateParts(OrderPartsReqVO reqVO);
|
||||
|
||||
|
||||
// 拆包
|
||||
|
||||
+105
-19
@@ -82,11 +82,11 @@ public class PackServiceImpl implements PackService {
|
||||
// 查询打包首页分页数据信息,包裹数,板件数量信息
|
||||
IPage<PackRespVO> packRespVOS = productionStatusMapper.selectOrderPlate(page,collect,getUserOrganId());
|
||||
|
||||
for (PackRespVO record : packRespVOS.getRecords()) {
|
||||
|
||||
// 待处理量
|
||||
record.setPendingNum(record.getTotalPieceCount() - record.getPackPieceCount());
|
||||
}
|
||||
// for (PackRespVO record : packRespVOS.getRecords()) {
|
||||
//
|
||||
// // 待处理量
|
||||
// record.setPendingNum(record.getTotalPieceCount() - record.getPackPieceCount());
|
||||
// }
|
||||
|
||||
if (CollectionUtil.isEmpty(packRespVOS.getRecords())) {
|
||||
return new PageResult<>();
|
||||
@@ -185,13 +185,46 @@ public class PackServiceImpl implements PackService {
|
||||
// 更新配件
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateParts(OrderPartsReqVO reqVO) {
|
||||
public OrderPackageDO updateParts(OrderPartsReqVO reqVO) {
|
||||
|
||||
OrderPackageDO orderPackageDO = orderPackageMapper.selectByPackId(reqVO.getPackId(), getUserOrganId());
|
||||
|
||||
List<OrderItemDO> orderItemDOS = orderItemMapper.selectPackList(reqVO.getPackId(), getUserOrganId());
|
||||
List<Long> partsList = orderItemDOS.stream().map(m -> m.getPartsId()).collect(Collectors.toList());
|
||||
|
||||
|
||||
// 如果此时删除的包裹配件数量等于查询出来的配件数量,且新增的板材数量不为0,更改包裹的类型
|
||||
if(reqVO.getDeletePartsList().size() == partsList.size() && !reqVO.getAddPlateIdList().isEmpty()){
|
||||
|
||||
|
||||
// 删除生产单明细表板件对应的包裹ID
|
||||
orderItemMapper.deletePackId(reqVO.getDeletePartsList(), reqVO.getPackId());
|
||||
|
||||
|
||||
// 生产单明细表配件新增对应的包裹ID
|
||||
orderItemMapper.insertParts(reqVO.getAddPlateIdList(),reqVO.getPackId(),reqVO.getOrderNo());
|
||||
|
||||
|
||||
// 更新包裹类型和包裹的状态
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.PLATE.getType());
|
||||
orderPackageDO.setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
orderPackageMapper.updateById(orderPackageDO);
|
||||
return orderPackageDO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 生产明细表新增的配件ID
|
||||
orderItemMapper.insertParts(reqVO.getAddPartsList(),reqVO.getPackId(),reqVO.getOrderNo());
|
||||
|
||||
// 生产明细表删除的配件ID
|
||||
orderItemMapper.deletePartsList(reqVO.getDeletePartsList(),reqVO.getPackId(),reqVO.getOrderNo());
|
||||
|
||||
orderPackageDO.setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
|
||||
orderPackageMapper.updateById(orderPackageDO);
|
||||
|
||||
return orderPackageDO;
|
||||
}
|
||||
|
||||
|
||||
@@ -237,21 +270,26 @@ public class PackServiceImpl implements PackService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public OrderPackageDO insertPack(OrderPackReqVO packageVO) {
|
||||
|
||||
List<OrderPackageDO> orderPackageDOS = orderPackageMapper.selectPackStatus(packageVO.getOrderId(),getUserOrganId());
|
||||
for (OrderPackageDO orderPackageDO : orderPackageDOS) {
|
||||
Integer status = orderPackageDO.getStatus();
|
||||
if (status.equals(OrderPackageStatusEnum.UNPACKED.getStatus())){
|
||||
throw ServiceExceptionUtil.exception(ErrorCodeConstants.THE_CURRENT_PACKAGE_HAS_AN_UNSEALED_PACKAGE);
|
||||
}
|
||||
}
|
||||
|
||||
// List<OrderPackageDO> orderPackageDOS = orderPackageMapper.selectPackStatus(packageVO.getOrderId(),getUserOrganId());
|
||||
// for (OrderPackageDO orderPackageDO : orderPackageDOS) {
|
||||
// Integer status = orderPackageDO.getStatus();
|
||||
// if (status.equals(OrderPackageStatusEnum.UNPACKED.getStatus())){
|
||||
// throw ServiceExceptionUtil.exception(ErrorCodeConstants.THE_CURRENT_PACKAGE_HAS_AN_UNSEALED_PACKAGE);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
OrderPackageDO orderPackageDO = new OrderPackageDO();
|
||||
orderPackageDO.setOrderId(packageVO.getOrderId());
|
||||
orderPackageDO.setType(packageVO.getPackageType());
|
||||
// orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
orderPackageDO.setPackageNo(packageVO.getPackNo());
|
||||
// 判断板材和配件哪个有数据,新增对应的类型
|
||||
// if(!packageVO.getAddPlateIdList().isEmpty()){
|
||||
// orderPackageDO.setType(OrderPackageTypeEnum.PLATE.getType());
|
||||
// }else {
|
||||
// orderPackageDO.setType(OrderPackageTypeEnum.PARTS.getType());
|
||||
// }
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.PLATE.getType());
|
||||
orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
// orderPackageDO.setPackageNo(packageVO.getPackNo());
|
||||
orderPackageDO.setStatus((OrderPackageStatusEnum.PACKAGED.getStatus()));
|
||||
orderPackageDO.setRemark(packageVO.getRemark());
|
||||
orderPackageMapper.insert(orderPackageDO);
|
||||
@@ -280,13 +318,61 @@ public class PackServiceImpl implements PackService {
|
||||
public OrderPackageDO updatePack(OrderPackReqVO packageVO) {
|
||||
|
||||
|
||||
// 判断包裹ID是否为空,为空,走新增,不为空,走更新
|
||||
if(packageVO.getPackId()==null){
|
||||
|
||||
OrderPackageDO orderPackageDO = new OrderPackageDO();
|
||||
orderPackageDO.setOrderId(packageVO.getOrderId());
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.PLATE.getType());
|
||||
orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
orderPackageDO.setStatus((OrderPackageStatusEnum.PACKAGED.getStatus()));
|
||||
orderPackageDO.setRemark(packageVO.getRemark());
|
||||
orderPackageMapper.insert(orderPackageDO);
|
||||
// 生产单明细表新增包裹 ID
|
||||
orderItemMapper.insertPackId(packageVO.getAddPlateIdList(), orderPackageDO.getId());
|
||||
|
||||
return orderPackageDO;
|
||||
}
|
||||
|
||||
|
||||
OrderPackageDO orderPackageDO = orderPackageMapper.selectByPackId(packageVO.getPackId(), getUserOrganId());
|
||||
List<OrderItemDO> orderItemDOS = orderItemMapper.selectPackList(packageVO.getPackId(), getUserOrganId());
|
||||
List<Long> plateList = orderItemDOS.stream().map(m -> m.getPlateId()).collect(Collectors.toList());
|
||||
// List<Long> partsList = orderItemDOS.stream().map(m -> m.getPartsId()).collect(Collectors.toList());
|
||||
|
||||
|
||||
// 如果此时删除的包裹板材数量等于查询出来的板材数量,且新增的配件数量不为0,更改包裹的类型
|
||||
if(packageVO.getDeletePlateIdList().size() == plateList.size() && !packageVO.getAddPartsIdList().isEmpty()){
|
||||
|
||||
|
||||
// 删除生产单明细表板件对应的包裹ID
|
||||
orderItemMapper.deletePackId(packageVO.getDeletePlateIdList(), packageVO.getPackId());
|
||||
|
||||
|
||||
// 生产单明细表配件新增对应的包裹ID
|
||||
orderItemMapper.insertParts(packageVO.getAddPartsIdList(),packageVO.getPackId(),packageVO.getOrderId());
|
||||
|
||||
|
||||
// 更新包裹类型和包裹的状态
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.PARTS.getType());
|
||||
orderPackageDO.setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
orderPackageMapper.updateById(orderPackageDO);
|
||||
return orderPackageDO;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 生产明细表新增包裹ID
|
||||
orderItemMapper.insertPackId(packageVO.getAddPlateIdList(), packageVO.getPackId());
|
||||
|
||||
// 移除生产明细表中板件对应的包裹ID
|
||||
orderItemMapper.deletePackId(packageVO.getDeletePlateIdList(), packageVO.getPackId());
|
||||
|
||||
return orderPackageMapper.selectByPackId(packageVO.getPackId(),getUserOrganId()).setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
orderPackageDO.setStatus(OrderPackageStatusEnum.PACKAGED.getStatus());
|
||||
|
||||
orderPackageMapper.updateById(orderPackageDO);
|
||||
|
||||
return orderPackageDO;
|
||||
|
||||
}
|
||||
|
||||
@@ -360,7 +446,7 @@ public class PackServiceImpl implements PackService {
|
||||
// orderPackageDO.setPackageNo(PackageNoUtil.randomPageNo());
|
||||
orderPackageDO.setPackageNo(reqVO.getPackNo());
|
||||
orderPackageDO.setOrderId(reqVO.getOrderId());
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.OTHER_ACCESSORIES.getType().longValue());
|
||||
orderPackageDO.setType(OrderPackageTypeEnum.OTHER_ACCESSORIES.getType());
|
||||
|
||||
// 新增包裹
|
||||
orderPackageMapper.insert(orderPackageDO);
|
||||
|
||||
+5
@@ -2,6 +2,7 @@ package com.cf.imes.module.manage.service.process;
|
||||
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.log.Log;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||
import com.cf.imes.framework.common.enums.ProcessProcessingTypeEnum;
|
||||
@@ -21,6 +22,7 @@ import com.cf.imes.module.manage.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.manage.dal.mysql.process.*;
|
||||
import com.cf.imes.module.manage.dal.mysql.query.OrderItemMapper;
|
||||
import com.cf.imes.module.system.enums.ErrorCodeConstants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -42,6 +44,7 @@ import static com.cf.imes.module.manage.util.search.SearchUtil.insertSeparator;
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
|
||||
|
||||
@@ -154,6 +157,8 @@ public class ProductionProcessServiceImpl implements ProductionProcessService {
|
||||
// 修改生产明细表和步骤表的工序状态
|
||||
processStepItemMapper.updateStatus(reqVo.getProcessStepId(),nickname,salary);
|
||||
}catch (Exception e){
|
||||
log.error(String.valueOf(e));
|
||||
|
||||
throw ServiceExceptionUtil.exception(ErrorCodeConstants.UNPROCESSED_BEFORE_PROCESSING);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -176,7 +176,8 @@
|
||||
from order_process_step ops
|
||||
join order_process_step_item opsi on ops.id = opsi.process_step_id and ops.organ_id = opsi.organ_id
|
||||
join order_process op on ops.order_process_id = op.id and ops.organ_id = op.organ_id
|
||||
where ops.id = #{processStepId};
|
||||
where ops.id = #{processStepId}
|
||||
group by ops.piece_type,piece_rate,op.size;
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@
|
||||
join order_plate op on oi.plate_id = op.id and oi.organ_id = op.organ_id
|
||||
join order_goods ogs on op.goods_id = ogs.id and op.organ_id = ogs.organ_id
|
||||
join order_body ob on oi.body_id = ob.id and oi.organ_id = ob.organ_id
|
||||
join order_group og on ob.id = og.body_id and ob.organ_id = og.organ_id
|
||||
left join order_group og on oi.group_id = og.id and ob.organ_id = og.organ_id
|
||||
|
||||
where
|
||||
oi.package_id =#{packageId} and oi.organ_id = #{organId}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
|
||||
<resultMap id="PartsListMap" type="com.cf.imes.module.manage.controller.admin.pack.vo.OrderPartsRespVO">
|
||||
|
||||
<result property="id" column="partsId"/>
|
||||
<result property="partsId" column="partsId"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="isComposite" column="isComposite"/>
|
||||
|
||||
|
||||
+13
-14
@@ -72,18 +72,8 @@
|
||||
o.address as address,
|
||||
o.salesman as salesman,
|
||||
o.splitter as splitter,
|
||||
o.status as status,
|
||||
oi.package_id as packId,
|
||||
count(distinct
|
||||
case
|
||||
when oi.package_id!=0 then oi.package_id end
|
||||
) as packCount,
|
||||
count(distinct case
|
||||
when oi.package_id !=0 and oi.parts_id = 0 then oi.plate_id end )as packPieceCount,
|
||||
count(distinct
|
||||
case
|
||||
when oi.plate_id !=0 then oi.plate_id end
|
||||
)as totalPieceCount
|
||||
o.status as status
|
||||
|
||||
|
||||
FROM `orders` o
|
||||
join order_item oi on o.id = oi.order_id and o.organ_id = oi.organ_id
|
||||
@@ -95,14 +85,23 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
group by orderNo,customOrderNo,dealer,createTime,deliveryDate,customer,phoneNumber,address,salesman,splitter,status,packId;
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!-- -- count(distinct-->
|
||||
<!-- -- case-->
|
||||
<!-- -- when oi.package_id!=0 then oi.package_id end-->
|
||||
<!-- -- ) as packCount,-->
|
||||
<!-- -- count(distinct case-->
|
||||
<!-- -- when oi.package_id !=0 and oi.parts_id = 0 then oi.plate_id end )as packPieceCount,-->
|
||||
<!-- -- count(distinct-->
|
||||
<!-- -- case-->
|
||||
<!-- -- when oi.plate_id !=0 then oi.plate_id end-->
|
||||
<!-- -- )as totalPieceCount-->
|
||||
|
||||
|
||||
<!-- -- group by orderNo,customOrderNo,dealer,createTime,deliveryDate,customer,phoneNumber,address,salesman,splitter,status;-->
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
PUT imes_order_parts_remark_model
|
||||
{
|
||||
"settings": {},
|
||||
"mappings": {
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"partsId": {
|
||||
"type": "long"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "long"
|
||||
},
|
||||
"remark": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"specExtras": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"doorRemark": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"hingeRemark": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"specialRemark": {
|
||||
"type": "text",
|
||||
"fields": {
|
||||
"keyword": {
|
||||
"type": "keyword",
|
||||
"ignore_above": 256
|
||||
}
|
||||
}
|
||||
},
|
||||
"createTime": {
|
||||
"type": "date",
|
||||
"format": "strict_date_optional_time||yyyy-MM-dd HH:mm:ss||epoch_millis"
|
||||
},
|
||||
"creator": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"updateTime": {
|
||||
"type": "date",
|
||||
"format": "strict_date_optional_time||yyyy-MM-dd HH:mm:ss||epoch_millis"
|
||||
},
|
||||
"updater": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user