fix:部分小逻辑优化
This commit is contained in:
@@ -145,7 +145,7 @@ public class PdaIosInController {
|
||||
/**
|
||||
* 中钨单据查询
|
||||
*/
|
||||
@GetMapping("/getFormDataList")
|
||||
@PostMapping("/getFormDataList")
|
||||
@Log("中钨单据查询")
|
||||
public ResponseEntity<Object> getFormDataList(@RequestParam Map whereJson) {
|
||||
return new ResponseEntity<>(pdaIosInService.getFormDataList(whereJson), HttpStatus.OK);
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.nl.wms.pda_manage.ios_manage.service.PdaIosOutService;
|
||||
import org.nl.wms.pda_manage.util.PdaResponse;
|
||||
import org.nl.wms.pm_manage.service.IPmFormDataService;
|
||||
import org.nl.wms.pm_manage.service.dao.PmFormData;
|
||||
import org.nl.wms.pm_manage.service.dao.PmFormDataSelectDto;
|
||||
import org.nl.wms.sch_manage.enums.PointStatusEnum;
|
||||
import org.nl.wms.sch_manage.enums.StatusEnum;
|
||||
import org.nl.wms.sch_manage.enums.TaskEnum;
|
||||
@@ -375,12 +376,22 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
throw new BadRequestException("出入库单据类型中,来料入库字典未配置。");
|
||||
}
|
||||
|
||||
return PdaResponse.requestParamOk(iPmFormDataService.list(new LambdaUpdateWrapper<PmFormData>()
|
||||
List<PmFormData> pmFormDataList = iPmFormDataService.list(new LambdaUpdateWrapper<PmFormData>()
|
||||
.eq(PmFormData::getIs_finish, 0)
|
||||
.like(whereJson.containsKey("form_data_code"),
|
||||
PmFormData::getCode, whereJson.get("form_data_code"))
|
||||
.eq(PmFormData::getForm_type, dictList.get(0).getValue())
|
||||
.ne(PmFormData::getStatus, StatusEnum.FORM_STATUS.code("完成"))));
|
||||
.eq(PmFormData::getForm_type, dictList.get(0).getValue())
|
||||
.ne(PmFormData::getStatus, StatusEnum.FORM_STATUS.code("完成")));
|
||||
|
||||
List<PmFormDataSelectDto> pmFormDataSelectDtoList = new ArrayList();
|
||||
pmFormDataList.forEach(a-> {
|
||||
PmFormDataSelectDto pmFormDataSelectDto = new PmFormDataSelectDto();
|
||||
pmFormDataSelectDto.setText(a.getCode());
|
||||
pmFormDataSelectDto.setValue(a.getCode());
|
||||
pmFormDataSelectDtoList.add(pmFormDataSelectDto);
|
||||
});
|
||||
|
||||
return PdaResponse.requestParamOk(pmFormDataSelectDtoList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -390,7 +401,7 @@ public class PdaIosInServiceImpl implements PdaIosInService {
|
||||
whereJson.put("noEmptyVehicle", whereJson.getString("noEmptyVehicle"));
|
||||
List<JSONObject> list = mdPbGroupplateMapper.getVehicleMaterial(whereJson);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
throw new BadRequestException("此载具未组盘,请检查!");
|
||||
throw new BadRequestException("载具" + whereJson.getString("vehicle_code") + "未组盘,请检查!");
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
package org.nl.wms.pm_manage.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* {@code @Description:} 表单信息表(PmFormData)实体类
|
||||
* {@code @Author:} zhengxuming
|
||||
*
|
||||
* @since 2025年8月11日16:38:03
|
||||
*/
|
||||
@Data
|
||||
public class PmFormDataSelectDto extends Model<PmFormDataSelectDto> {
|
||||
|
||||
private static final long serialVersionUID = -7739291296662381393L;
|
||||
//@TableId(type = IdType.ASSIGN_ID)
|
||||
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 仓库编号
|
||||
*/
|
||||
private String stor_id;
|
||||
/**
|
||||
* 仓库信息
|
||||
*/
|
||||
private String stor_name;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
/**
|
||||
* 单据类型
|
||||
*/
|
||||
private String form_type;
|
||||
|
||||
|
||||
/**
|
||||
* 源单单据日期
|
||||
*/
|
||||
private String source_form_date;
|
||||
|
||||
|
||||
/**
|
||||
* 物料code
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String pcsn;
|
||||
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private BigDecimal qty;
|
||||
|
||||
|
||||
/**
|
||||
* 分配数量
|
||||
*/
|
||||
private BigDecimal assign_qty;
|
||||
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
private BigDecimal actual_qty;
|
||||
|
||||
|
||||
/**
|
||||
* 数量单位
|
||||
*/
|
||||
private String unit_id;
|
||||
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String unit_name;
|
||||
|
||||
|
||||
/**
|
||||
* 载具信息
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
|
||||
/**
|
||||
* 载具组盘id
|
||||
*/
|
||||
private String vehicle_id;
|
||||
|
||||
|
||||
/**
|
||||
* 自定义表单字段
|
||||
*/
|
||||
private String form_data;
|
||||
|
||||
|
||||
/**
|
||||
* 创建id
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
|
||||
/**
|
||||
* 创建id
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_name;
|
||||
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 是否完结
|
||||
*/
|
||||
private Integer is_finish;
|
||||
private String supp_code;
|
||||
private String supp_name;
|
||||
|
||||
private String text;
|
||||
|
||||
private String value;
|
||||
|
||||
|
||||
/**
|
||||
* 获取主键值
|
||||
*
|
||||
* @return 主键值
|
||||
*/
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user