移动端的单据编号自动生成
This commit is contained in:
parent
7f6547d999
commit
8a25d8dd0d
@ -78,10 +78,6 @@ public class WmIssueMobController extends BaseController {
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WmIssueHeader wmIssueHeader)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(wmIssueHeaderService.checkIssueCodeUnique(wmIssueHeader))){
|
||||
return AjaxResult.error("领料单编号已存在");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotNull(wmIssueHeader.getIssueCode())){
|
||||
if(UserConstants.NOT_UNIQUE.equals(wmIssueHeaderService.checkIssueCodeUnique(wmIssueHeader))){
|
||||
return AjaxResult.error("单据编号已存在!");
|
||||
|
@ -14,6 +14,7 @@ import com.ktg.mes.pro.service.IProWorkorderService;
|
||||
import com.ktg.mes.wm.domain.*;
|
||||
import com.ktg.mes.wm.domain.tx.RtIssueTxBean;
|
||||
import com.ktg.mes.wm.service.*;
|
||||
import com.ktg.system.strategy.AutoCodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -35,22 +36,15 @@ public class WmRtIssueMobController extends BaseController {
|
||||
@Autowired
|
||||
private IWmRtIssueLineService wmRtIssueLineService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IWmWarehouseService wmWarehouseService;
|
||||
|
||||
@Autowired
|
||||
private IWmStorageLocationService wmStorageLocationService;
|
||||
|
||||
@Autowired
|
||||
private IWmStorageAreaService wmStorageAreaService;
|
||||
|
||||
@Autowired
|
||||
private IStorageCoreService storageCoreService;
|
||||
|
||||
@Autowired
|
||||
private IProWorkorderService proWorkorderService;
|
||||
|
||||
@Autowired
|
||||
private AutoCodeUtil autoCodeUtil;
|
||||
|
||||
/**
|
||||
* 查询生产退料单头列表
|
||||
*/
|
||||
@ -85,9 +79,14 @@ public class WmRtIssueMobController extends BaseController {
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WmRtIssue wmRtIssue)
|
||||
{
|
||||
if(StringUtils.isNotNull(wmRtIssue.getRtCode())){
|
||||
if(UserConstants.NOT_UNIQUE.equals(wmRtIssueService.checkUnique(wmRtIssue))){
|
||||
return AjaxResult.error("退料单编号已存在");
|
||||
}
|
||||
}else {
|
||||
wmRtIssue.setRtCode(autoCodeUtil.genSerialCode(UserConstants.RTISSUE_CODE,""));
|
||||
}
|
||||
|
||||
|
||||
if(StringUtils.isNotNull(wmRtIssue.getWorkorderId())){
|
||||
ProWorkorder workorder = proWorkorderService.selectProWorkorderByWorkorderId(wmRtIssue.getWorkorderId());
|
||||
|
@ -13,6 +13,7 @@ import com.ktg.mes.wm.domain.WmRtVendor;
|
||||
import com.ktg.mes.wm.domain.tx.RtVendorTxBean;
|
||||
import com.ktg.mes.wm.service.IStorageCoreService;
|
||||
import com.ktg.mes.wm.service.IWmRtVendorService;
|
||||
import com.ktg.system.strategy.AutoCodeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -36,6 +37,9 @@ public class WmRtVendorMobController extends BaseController {
|
||||
@Autowired
|
||||
private IMdVendorService mdVendorService;
|
||||
|
||||
@Autowired
|
||||
private AutoCodeUtil autoCodeUtil;
|
||||
|
||||
/**
|
||||
* 查询供应商退货列表
|
||||
*/
|
||||
@ -69,9 +73,13 @@ public class WmRtVendorMobController extends BaseController {
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WmRtVendor wmRtVendor)
|
||||
{
|
||||
if(StringUtils.isNotNull(wmRtVendor.getRtCode())){
|
||||
if(UserConstants.NOT_UNIQUE.equals(wmRtVendorService.checkCodeUnique(wmRtVendor))){
|
||||
return AjaxResult.error("退货单编号已经存在!");
|
||||
}
|
||||
}else {
|
||||
wmRtVendor.setRtCode(autoCodeUtil.genSerialCode(UserConstants.WM_RTVENDOR_CODE,""));
|
||||
}
|
||||
|
||||
if(StringUtils.isNotNull(wmRtVendor.getVendorId())){
|
||||
MdVendor vendor = mdVendorService.selectMdVendorByVendorId(wmRtVendor.getVendorId());
|
||||
|
Loading…
Reference in New Issue
Block a user