|
|
@ -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){
|
|
|
|