调整查询字段

This commit is contained in:
jing's 2024-01-07 11:44:16 +08:00
parent bdb726400f
commit 16620d0d77
6 changed files with 53 additions and 9 deletions

View File

@ -12,6 +12,7 @@ import com.nflg.product.bomnew.constant.MBomConstantEnum;
import com.nflg.product.bomnew.constant.ValueEnum; import com.nflg.product.bomnew.constant.ValueEnum;
import com.nflg.product.bomnew.pojo.dto.BomNewMBomChildDTO; import com.nflg.product.bomnew.pojo.dto.BomNewMBomChildDTO;
import com.nflg.product.bomnew.pojo.dto.BomNewMbomApplyBackMaterialDTO; import com.nflg.product.bomnew.pojo.dto.BomNewMbomApplyBackMaterialDTO;
import com.nflg.product.bomnew.pojo.dto.BomNewMbomSuperStatusDTO;
import com.nflg.product.bomnew.pojo.query.BomNewMbomBackMaterialQuery; import com.nflg.product.bomnew.pojo.query.BomNewMbomBackMaterialQuery;
import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery; import com.nflg.product.bomnew.pojo.query.BomNewMbomParentQuery;
import com.nflg.product.bomnew.pojo.vo.BomNewMbomBackMaterialVO; import com.nflg.product.bomnew.pojo.vo.BomNewMbomBackMaterialVO;
@ -112,18 +113,19 @@ public class MBomApi extends BaseApi {
@PostMapping("superSaterialStatus") @PostMapping("superSaterialStatus")
@ApiOperation("设置超级物料") @ApiOperation("设置超级物料")
public ResultVO<Boolean> superSaterialStatus(@ApiParam("超级物料 0-否 1-是") @RequestParam(value = "status") Integer status, @RequestParam(value = "rowId") Long rowId) { public ResultVO<Boolean> superSaterialStatus(
if (Objects.isNull(rowId)) { @RequestBody BomNewMbomSuperStatusDTO dto) {
if (Objects.isNull(dto.getRowId() )) {
throw new NflgBusinessException(STATE.ParamErr, "选择行后操作"); throw new NflgBusinessException(STATE.ParamErr, "选择行后操作");
} }
if (Objects.isNull(status)) { if (Objects.isNull(dto.getStatus())) {
throw new NflgBusinessException(STATE.ParamErr, "status 不能为空"); throw new NflgBusinessException(STATE.ParamErr, "status 不能为空");
} }
if (StrUtil.isEmpty(EnumUtils.getEnumDescription(MBomConstantEnum.MBomSuperMaterialStatusEnum.class, status))) { if (StrUtil.isEmpty(EnumUtils.getEnumDescription(MBomConstantEnum.MBomSuperMaterialStatusEnum.class, dto.getStatus()))) {
throw new NflgBusinessException(STATE.ParamErr, "status 不在范围内"); throw new NflgBusinessException(STATE.ParamErr, "status 不在范围内");
} }
bomNewMbomDetailService.superSaterialStatusTag(rowId, status); bomNewMbomDetailService.superSaterialStatusTag(dto.getRowId(), dto.getStatus());
return ResultVO.success(true); return ResultVO.success(true);
} }
@PostMapping("backListPage") @PostMapping("backListPage")

View File

@ -0,0 +1,18 @@
package com.nflg.product.bomnew.pojo.dto;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
@Data
public class BomNewMbomSuperStatusDTO {
@ApiModelProperty("超级物料 0-否 1-是")
private Integer status;
@ApiModelProperty("行id")
private Long rowId;
}

View File

@ -62,6 +62,10 @@ public class BomNewMbomBackMaterialVO extends BomNewMbomMiddleVO {
private LocalDateTime confirmTime; private LocalDateTime confirmTime;
@ApiModelProperty(value = "退回原因")
private String reasonMsg;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -101,6 +101,12 @@ public class BomNewMbomMiddleVO extends BaseMaterialVO implements Serializable {
@ApiModelProperty(value = "数量") @ApiModelProperty(value = "数量")
private BigDecimal num; private BigDecimal num;
/**
* 总重
*/
@ApiModelProperty(value = "总重")
private BigDecimal totalWeight;
/** /**
* 是否最新版0- 1- * 是否最新版0- 1-
*/ */
@ -160,7 +166,11 @@ public class BomNewMbomMiddleVO extends BaseMaterialVO implements Serializable {
*/ */
@ApiModelProperty(value = "版本过期时间=下个版本的创建时间") @ApiModelProperty(value = "版本过期时间=下个版本的创建时间")
private LocalDateTime expireEndTime; private LocalDateTime expireEndTime;
/**
* 单重
*/
@ApiModelProperty(value = "单重")
private BigDecimal unitWeight=null;
/** /**
* 备注 * 备注
*/ */

View File

@ -24,6 +24,7 @@ import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -96,6 +97,15 @@ public class BomNewMbomBackMaterialService extends ServiceImpl<BomNewMbomBackMat
throw new NflgBusinessException(STATE.BusinessError,"选择数据已申请退回"); throw new NflgBusinessException(STATE.BusinessError,"选择数据已申请退回");
} }
dto.getRowIds().forEach(item->{
if(Objects.equals(item.getRowId(),item.getBomRowId())){
throw new NflgBusinessException(STATE.BusinessError,"不能选择顶层数据退回");
}
});
QueryWrapper<BomNewMbomDetailEntity> queryWrapper2=new QueryWrapper<>(); QueryWrapper<BomNewMbomDetailEntity> queryWrapper2=new QueryWrapper<>();
queryWrapper2.lambda().in(BomNewMbomDetailEntity::getRowId,backRowId); queryWrapper2.lambda().in(BomNewMbomDetailEntity::getRowId,backRowId);
List<BomNewMbomDetailEntity> list= SpringUtil.getBean(BomNewMbomDetailService.class).list(queryWrapper2); List<BomNewMbomDetailEntity> list= SpringUtil.getBean(BomNewMbomDetailService.class).list(queryWrapper2);

View File

@ -31,9 +31,9 @@
<select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomBackMaterialVO"> <select id="getListPage" resultType="com.nflg.product.bomnew.pojo.vo.BomNewMbomBackMaterialVO">
select t1.*, t2.drawing_no, select t1.*, t2.drawing_no,
t2. fac_code, t2.fac_code,
t2.material_no, t2.material_no,
t2. material_name, t2.material_name,
t2.material_desc, t2.material_desc,
t2.material_texture, t2.material_texture,
t2.material_unit, t2.material_unit,