psh
10 months ago
9 changed files with 100 additions and 93 deletions
@ -1,47 +1,56 @@ |
|||
package org.nl.wms.pdm.controller; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.common.base.TableDataInfo; |
|||
import org.nl.common.domain.query.PageQuery; |
|||
import org.nl.common.logging.annotation.Log; |
|||
import org.nl.wms.pda.service.PdaService; |
|||
import org.nl.wms.pdm.service.IPdmBdWorkorderService; |
|||
import org.nl.wms.pdm.service.dao.PdmBdWorkorder; |
|||
import org.nl.wms.pdm.service.dao.PdmBdWorkorderDetail; |
|||
import org.nl.wms.pdm.service.dao.PointDetailAdd; |
|||
import org.nl.wms.pdm.service.dto.PdmBdWorkorderQuery; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Set; |
|||
|
|||
|
|||
@Slf4j |
|||
@RestController |
|||
@Api(tags = "工单详情管理") |
|||
@RequestMapping("/api/pdmBdWorkorderDetail") |
|||
public class PdmBdWorkorderDetailController { |
|||
@RequestMapping("/api/pointDetail") |
|||
public class PointDetailController { |
|||
|
|||
@Autowired |
|||
private IPdmBdWorkorderService pdmBdWorkorderService; |
|||
@Autowired |
|||
private PdaService pdaService; |
|||
|
|||
@GetMapping |
|||
@Log("查询工单详情管理") |
|||
@ApiOperation("查询工单详情管理") |
|||
@Log("根据物料查询点位库存") |
|||
@ApiOperation("根据物料查询点位库存") |
|||
//@SaCheckPermission("@el.check('pdmBdWorkorder:list')")
|
|||
public ResponseEntity<Object> query(PdmBdWorkorderQuery query, PageQuery page){ |
|||
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryAllDetail(query,page)),HttpStatus.OK); |
|||
public ResponseEntity<Object> query(String productname, PageQuery page){ |
|||
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryPointDetail(productname,page)),HttpStatus.OK); |
|||
} |
|||
|
|||
@GetMapping |
|||
@Log("根据物料查询点位库存") |
|||
@ApiOperation("根据物料查询点位库存") |
|||
@PostMapping("/add") |
|||
@Log("批量新增原材料出库任务") |
|||
@ApiOperation("批量新增原材料出库任务") |
|||
//@SaCheckPermission("@el.check('pdmBdWorkorder:list')")
|
|||
public ResponseEntity<Object> queryPointDetail(String PalletSN, PageQuery page){ |
|||
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryPointDetail(PalletSN,page)),HttpStatus.OK); |
|||
public ResponseEntity<Object> add(@RequestBody PointDetailAdd pointDetailAdd){ |
|||
log.info("批量新增原材料出库任务:"+pointDetailAdd.toString()); |
|||
for(String point_code:pointDetailAdd.getPointCodes()){ |
|||
JSONObject param=new JSONObject(); |
|||
param.put("start_point",point_code); |
|||
param.put("time",pointDetailAdd.getTime()); |
|||
param.put("mode",pointDetailAdd.getMode()); |
|||
param.put("workorder_code",pointDetailAdd.getWorkorder_code()); |
|||
pdaService.yclck(param); |
|||
} |
|||
return new ResponseEntity<>(HttpStatus.OK); |
|||
} |
|||
|
|||
} |
|||
|
@ -1,50 +1,27 @@ |
|||
package org.nl.wms.pdm.service.dto; |
|||
package org.nl.wms.pdm.service.dao; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.bean.copier.CopyOptions; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
import org.nl.wms.mes.domain.QPMES060RequestBody; |
|||
import org.nl.wms.mes.domain.QPMES098RequestBodyItem2; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@EqualsAndHashCode(callSuper = false) |
|||
@TableName("sch_base_material") |
|||
public class PdmBdWorkorderDetail implements Serializable { |
|||
|
|||
@TableName("pmd_bd_workorder_detail") |
|||
public class PdmBdWorkorderDetail extends QPMES098RequestBodyItem2 implements Serializable { |
|||
/** 工单编号 */ |
|||
private String workorder_code; |
|||
/** 实际数量 */ |
|||
private BigDecimal real_qty; |
|||
/** 订单行项目编号 **/ |
|||
private String POSNR; |
|||
/** 预留行项目编号 **/ |
|||
private String RSPOS; |
|||
/** 移动类型 **/ |
|||
private String BWART; |
|||
/** 物料编码 **/ |
|||
private String MATNR; |
|||
/** 物料名称 **/ |
|||
private String MAKTX; |
|||
/** 产品类别 **/ |
|||
private String MTYPE; |
|||
/** 产品类别描述 **/ |
|||
private String MTYTXT; |
|||
/** 数量 **/ |
|||
private String BDMNG; |
|||
/** 计量单位 **/ |
|||
private String MEINS; |
|||
/** 物料供应标识 **/ |
|||
private String BEIKZ; |
|||
/** 预留字段11 **/ |
|||
private String ZRSV11; |
|||
/** 预留字段12 **/ |
|||
private String ZRSV12; |
|||
/** 预留字段13 **/ |
|||
private String ZRSV13; |
|||
/** 预留字段14 **/ |
|||
private String ZRSV14; |
|||
/** 预留字段15 **/ |
|||
private String ZRSV15; |
|||
|
|||
public void copyFrom(QPMES098RequestBodyItem2 source){ |
|||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
|||
} |
|||
|
|||
} |
|||
|
@ -1,2 +1,11 @@ |
|||
package org.nl.wms.pdm.service.dao;public class PointDetail { |
|||
package org.nl.wms.pdm.service.dao; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class PointDetail { |
|||
private String point_code; |
|||
private String productName; |
|||
private String PalletSN; |
|||
private String qty; |
|||
} |
|||
|
Loading…
Reference in new issue