新增调拨单返回值修改

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)
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsAllocateOrderBo bo) {
return toAjax(wmsAllocateOrderService.insertByBo(bo));
public R<String> add(@RequestBody WmsAllocateOrderBo 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;
/**

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

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

Loading…
Cancel
Save