新增调拨单返回值修改

master
maxw@mesnac.com 7 days ago
parent b3bc122741
commit 7fd415def9

@ -76,8 +76,8 @@ public class WmsAllocateOrderController extends BaseController {
@Log(title = "调拨工单", businessType = BusinessType.INSERT) @Log(title = "调拨工单", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsAllocateOrderBo bo) { public R<String> add(@RequestBody WmsAllocateOrderBo bo) {
return toAjax(wmsAllocateOrderService.insertByBo(bo)); return R.ok(wmsAllocateOrderService.insertByBo(bo));
} }
/** /**

@ -85,7 +85,7 @@ public class WmsAllocateOrderBo extends BaseEntity {
/** /**
* *
*/ */
@NotBlank(message = "是否创建出库单不能为空", groups = { AddGroup.class, EditGroup.class }) // @NotBlank(message = "是否创建出库单不能为空", groups = { AddGroup.class, EditGroup.class })
private String createOut; private String createOut;
/** /**

@ -47,7 +47,7 @@ public interface IWmsAllocateOrderService {
* @param bo * @param bo
* @return * @return
*/ */
Boolean insertByBo(WmsAllocateOrderBo bo); String insertByBo(WmsAllocateOrderBo bo);
/** /**
* *

@ -137,7 +137,7 @@ public class WmsAllocateOrderServiceImpl implements IWmsAllocateOrderService {
* @return * @return
*/ */
@Override @Override
public Boolean insertByBo(WmsAllocateOrderBo bo) { public String insertByBo(WmsAllocateOrderBo bo) {
Date date = new Date(); Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHssmm"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHssmm");
String orderDate = format.format(date).substring(2); String orderDate = format.format(date).substring(2);
@ -157,20 +157,20 @@ public class WmsAllocateOrderServiceImpl implements IWmsAllocateOrderService {
String allocateOrder = allocate + orderDate + orderLast; String allocateOrder = allocate + orderDate + orderLast;
WmsAllocateOrder add = MapstructUtils.convert(bo, WmsAllocateOrder.class); WmsAllocateOrder add = MapstructUtils.convert(bo, WmsAllocateOrder.class);
add.setAllocateOrderCode(allocateOrder); add.setAllocateOrderCode(allocateOrder);
if (bo.getCreateIn().equals("1")){ // if (bo.getCreateIn().equals("1")){
allocateInOrder = allocateIn + orderDate + orderLast; // allocateInOrder = allocateIn + orderDate + orderLast;
add.setInCode(allocateInOrder); // add.setInCode(allocateInOrder);
} // }
if (bo.getCreateOut().equals("1")){ // if (bo.getCreateOut().equals("1")){
allocateOutOrder = allocateOut + orderDate + orderLast; // allocateOutOrder = allocateOut + orderDate + orderLast;
add.setOutCode(allocateOutOrder); // add.setOutCode(allocateOutOrder);
} // }
validEntityBeforeSave(add); validEntityBeforeSave(add);
boolean flag = baseMapper.insert(add) > 0; boolean flag = baseMapper.insert(add) > 0;
if (flag) { if (flag) {
bo.setAoId(add.getAoId()); bo.setAoId(add.getAoId());
} }
return flag; return allocateOrder;
} }
public String generateOrder(Integer value){ public String generateOrder(Integer value){
if (value.toString().length()<3){ if (value.toString().length()<3){

Loading…
Cancel
Save