psh
5 months ago
16 changed files with 397 additions and 4 deletions
@ -0,0 +1,19 @@ |
|||||
|
package org.nl.wms.mes.domain; |
||||
|
|
||||
|
import lombok.*; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
import javax.xml.bind.annotation.XmlRootElement; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
@ToString |
||||
|
@Builder |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
@XmlRootElement |
||||
|
@Accessors(chain = true) |
||||
|
public class QPMES155Request { |
||||
|
private Head HEAD; |
||||
|
private List<QPMES155RequestBody> BODY; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package org.nl.wms.mes.domain; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class QPMES155RequestBody { |
||||
|
//出库单号
|
||||
|
private String somtOrderNo; |
||||
|
//生产工单
|
||||
|
private String moname; |
||||
|
//托号
|
||||
|
private String palletSN; |
||||
|
//晶棒号
|
||||
|
private String lotSN; |
||||
|
//物料编码
|
||||
|
private String productName; |
||||
|
//物料描述
|
||||
|
private String productDescription; |
||||
|
//客户编码
|
||||
|
private String supplierCode; |
||||
|
//客户名称
|
||||
|
private String supplierName; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package org.nl.wms.mes.domain; |
||||
|
|
||||
|
import com.alibaba.fastjson.annotation.JSONField; |
||||
|
import lombok.Data; |
||||
|
import lombok.ToString; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
@ToString |
||||
|
public class QPMES155Response { |
||||
|
@JSONField(name = "HEAD") |
||||
|
private Head HEAD; |
||||
|
@JSONField(name = "BODY") |
||||
|
private List<QPMES155ResponseBody> BODY; |
||||
|
|
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package org.nl.wms.mes.domain; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class QPMES155ResponseBody { |
||||
|
//消息状态
|
||||
|
private String STATUS; |
||||
|
//消息文本
|
||||
|
private String MESSAGE; |
||||
|
//预留主键1
|
||||
|
private String KEY_VALUE01; |
||||
|
//预留主键2
|
||||
|
private String KEY_VALUE02; |
||||
|
//预留主键3
|
||||
|
private String KEY_VALUE03; |
||||
|
//预留主键4
|
||||
|
private String KEY_VALUE04; |
||||
|
//预留主键5
|
||||
|
private String KEY_VALUE05; |
||||
|
//预留主键6
|
||||
|
private String KEY_VALUE06; |
||||
|
//预留主键7
|
||||
|
private String KEY_VALUE07; |
||||
|
//预留主键8
|
||||
|
private String KEY_VALUE08; |
||||
|
//预留主键9
|
||||
|
private String KEY_VALUE09; |
||||
|
//预留反馈主键1
|
||||
|
private String FKEY_VALUE01; |
||||
|
//预留反馈主键2
|
||||
|
private String FKEY_VALUE02; |
||||
|
//预留反馈主键3
|
||||
|
private String FKEY_VALUE03; |
||||
|
//预留反馈主键4
|
||||
|
private String FKEY_VALUE04; |
||||
|
//预留反馈主键5
|
||||
|
private String FKEY_VALUE05; |
||||
|
//预留反馈主键6
|
||||
|
private String FKEY_VALUE06; |
||||
|
//预留反馈主键7
|
||||
|
private String FKEY_VALUE07; |
||||
|
//预留反馈主键8
|
||||
|
private String FKEY_VALUE08; |
||||
|
//预留反馈主键9
|
||||
|
private String FKEY_VALUE09; |
||||
|
|
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.controller; |
||||
|
|
||||
|
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.sch.workorder.controller.service.IWorkorderService; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dao.Workorder; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dto.WorkorderQuery; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @author lyd |
||||
|
* @date 2023-05-16 |
||||
|
**/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "托盘出库工单管理") |
||||
|
@RequestMapping("/api/workorder") |
||||
|
public class WorkorderController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IWorkorderService workorderService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Log("查询托盘出库工单") |
||||
|
@ApiOperation("查询托盘出库工单") |
||||
|
//@SaCheckPermission("@el.check('material:list')")
|
||||
|
public ResponseEntity<Object> query(WorkorderQuery whereJson, PageQuery page){ |
||||
|
return new ResponseEntity<>(TableDataInfo.build(workorderService.queryAll(whereJson,page)),HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
@Log("新增托盘出库工单") |
||||
|
@ApiOperation("新增托盘出库工单") |
||||
|
//@SaCheckPermission("@el.check('material:add')")
|
||||
|
public ResponseEntity<Object> create(@Validated @RequestBody Workorder entity){ |
||||
|
workorderService.create(entity); |
||||
|
return new ResponseEntity<>(HttpStatus.CREATED); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
@Log("删除托盘出库工单") |
||||
|
@ApiOperation("删除托盘出库工单") |
||||
|
//@SaCheckPermission("@el.check('material:del')")
|
||||
|
@DeleteMapping |
||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) { |
||||
|
workorderService.deleteAll(ids); |
||||
|
return new ResponseEntity<>(HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import org.nl.common.domain.query.PageQuery; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dao.Workorder; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dto.WorkorderQuery; |
||||
|
|
||||
|
import java.util.Set; |
||||
|
|
||||
|
|
||||
|
public interface IWorkorderService extends IService<Workorder> { |
||||
|
|
||||
|
/** |
||||
|
* 查询数据分页 |
||||
|
* @param whereJson 条件 |
||||
|
* @param pageable 分页参数 |
||||
|
* @return IPage<Workorder> |
||||
|
*/ |
||||
|
IPage<Workorder> queryAll(WorkorderQuery whereJson, PageQuery pageable); |
||||
|
|
||||
|
/** |
||||
|
* 创建 |
||||
|
* @param entity / |
||||
|
*/ |
||||
|
void create(Workorder entity); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 多选删除 |
||||
|
* @param ids / |
||||
|
*/ |
||||
|
void deleteAll(Set<String> ids); |
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.service.dao; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.bean.copier.CopyOptions; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
import lombok.ToString; |
||||
|
import org.nl.wms.mes.domain.QPMES155RequestBody; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@ToString |
||||
|
@TableName("pdm_bd_workorder_two") |
||||
|
public class Workorder implements Serializable { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
@ApiModelProperty(value = "出库单号") |
||||
|
private String somtOrderNo; |
||||
|
@ApiModelProperty(value = "生产工单") |
||||
|
private String moname; |
||||
|
@ApiModelProperty(value = "托号") |
||||
|
private String palletSN; |
||||
|
@ApiModelProperty(value = "晶棒号") |
||||
|
private String lotSN; |
||||
|
@ApiModelProperty(value = "物料编码") |
||||
|
private String productName; |
||||
|
@ApiModelProperty(value = "物料描述") |
||||
|
private String productDescription; |
||||
|
@ApiModelProperty(value = "客户编码") |
||||
|
private String supplierCode; |
||||
|
@ApiModelProperty(value = "客户名称") |
||||
|
private String supplierName; |
||||
|
@ApiModelProperty(value = "入库类型0-新建,1-已出库") |
||||
|
private Integer status; |
||||
|
@ApiModelProperty(value = "创建时间") |
||||
|
private Date createTime; |
||||
|
|
||||
|
public void copyFrom(QPMES155RequestBody source){ |
||||
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.service.dao.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dao.Workorder; |
||||
|
|
||||
|
/** |
||||
|
* @author lyd |
||||
|
* @date 2023-05-16 |
||||
|
**/ |
||||
|
public interface WorkorderMapper extends BaseMapper<Workorder> { |
||||
|
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.service.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class WorkorderDto implements Serializable { |
||||
|
//出库单号
|
||||
|
private String somtOrderNo; |
||||
|
//生产工单
|
||||
|
private String moname; |
||||
|
//托号
|
||||
|
private String palletSN; |
||||
|
//晶棒号
|
||||
|
private String lotSN; |
||||
|
//物料编码
|
||||
|
private String productName; |
||||
|
//物料描述
|
||||
|
private String productDescription; |
||||
|
//客户编码
|
||||
|
private String supplierCode; |
||||
|
//客户名称
|
||||
|
private String supplierName; |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.service.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class WorkorderQuery implements Serializable { |
||||
|
//托盘号
|
||||
|
private String palletSN; |
||||
|
//物料条码号
|
||||
|
private String lotSN; |
||||
|
//物料名称
|
||||
|
private String productName; |
||||
|
//供应商编码
|
||||
|
private String productDescription; |
||||
|
//供应商名称
|
||||
|
private String supplierCode; |
||||
|
//绑定状态
|
||||
|
private String status; |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package org.nl.wms.sch.workorder.controller.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.nl.common.domain.query.PageQuery; |
||||
|
import org.nl.wms.sch.workorder.controller.service.IWorkorderService; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dao.Workorder; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dao.mapper.WorkorderMapper; |
||||
|
import org.nl.wms.sch.workorder.controller.service.dto.WorkorderQuery; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Set; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class WorkorderServiceImpl extends ServiceImpl<WorkorderMapper, Workorder> implements IWorkorderService { |
||||
|
|
||||
|
@Autowired |
||||
|
private WorkorderMapper workorderMapper; |
||||
|
|
||||
|
@Override |
||||
|
public IPage<Workorder> queryAll(WorkorderQuery whereJson, PageQuery page){ |
||||
|
IPage<Workorder> pages = new Page<>(page.getPage() + 1, page.getSize()); |
||||
|
LambdaQueryWrapper<Workorder> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getPalletSN()), Workorder::getPalletSN,whereJson.getPalletSN()); |
||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getLotSN()), Workorder::getLotSN,whereJson.getLotSN()); |
||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getProductName()), Workorder::getProductName,whereJson.getProductName()); |
||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getSupplierCode()), Workorder::getSupplierCode,whereJson.getSupplierCode()); |
||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getProductDescription()), Workorder::getProductDescription,whereJson.getProductDescription()); |
||||
|
wrapper.like(StringUtils.isNotBlank(whereJson.getStatus()), Workorder::getStatus,whereJson.getStatus()); |
||||
|
pages = workorderMapper.selectPage(pages, wrapper); |
||||
|
return pages; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void create(Workorder entity) { |
||||
|
workorderMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void deleteAll(Set<String> ids) { |
||||
|
// 真删除
|
||||
|
workorderMapper.deleteBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue