Compare commits
3 Commits
d9da0de59e
...
10fa4b3b15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10fa4b3b15 | ||
|
|
f25bb2a549 | ||
|
|
e65b5933ad |
@@ -27,25 +27,23 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/check/stockCheck")
|
@RequestMapping("/check/stockCheck")
|
||||||
public class CheckStockinController extends BaseController
|
public class CheckStockinController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICheckStockinService checkStockinService;
|
private ICheckStockinService checkStockinService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICheckStockinFinishService checkStockinFinishService;
|
private ICheckStockinFinishService checkStockinFinishService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询盘库单据主信息列表
|
* 查询盘库单据主信息列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:list')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(CheckStockin checkStockin)
|
public TableDataInfo list(CheckStockin checkStockin) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<CheckStockin> list = new ArrayList<>();
|
List<CheckStockin> list = new ArrayList<>();
|
||||||
if (checkStockin.getStatus() == null || Convert.toInt(checkStockin.getStatus())<4){
|
if (checkStockin.getStatus() == null || Convert.toInt(checkStockin.getStatus()) < 4) {
|
||||||
list = checkStockinService.selectCheckStockinList(checkStockin);
|
list = checkStockinService.selectCheckStockinList(checkStockin);
|
||||||
}else {
|
} else {
|
||||||
list = checkStockinFinishService.selectCheckStockinList(checkStockin);
|
list = checkStockinFinishService.selectCheckStockinList(checkStockin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,8 +56,7 @@ public class CheckStockinController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:export')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:export')")
|
||||||
@Log(title = "盘库单据主信息", businessType = BusinessType.EXPORT)
|
@Log(title = "盘库单据主信息", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, CheckStockin checkStockin)
|
public void export(HttpServletResponse response, CheckStockin checkStockin) {
|
||||||
{
|
|
||||||
List<CheckStockin> list = checkStockinService.selectCheckStockinList(checkStockin);
|
List<CheckStockin> list = checkStockinService.selectCheckStockinList(checkStockin);
|
||||||
ExcelUtil<CheckStockin> util = new ExcelUtil<CheckStockin>(CheckStockin.class);
|
ExcelUtil<CheckStockin> util = new ExcelUtil<CheckStockin>(CheckStockin.class);
|
||||||
util.exportExcel(response, list, "盘库单据主信息数据");
|
util.exportExcel(response, list, "盘库单据主信息数据");
|
||||||
@@ -70,8 +67,7 @@ public class CheckStockinController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:query')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:query')")
|
||||||
@GetMapping(value = "/{stockGuid}")
|
@GetMapping(value = "/{stockGuid}")
|
||||||
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid)
|
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid) {
|
||||||
{
|
|
||||||
return success(checkStockinService.selectCheckStockinByStockGuid(stockGuid));
|
return success(checkStockinService.selectCheckStockinByStockGuid(stockGuid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,8 +77,7 @@ public class CheckStockinController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:add')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:add')")
|
||||||
@Log(title = "盘库单据主信息", businessType = BusinessType.INSERT)
|
@Log(title = "盘库单据主信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody CheckStockin checkStockin)
|
public AjaxResult add(@RequestBody CheckStockin checkStockin) {
|
||||||
{
|
|
||||||
return toAjax(checkStockinService.insertCheckStockin(checkStockin));
|
return toAjax(checkStockinService.insertCheckStockin(checkStockin));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,8 +87,7 @@ public class CheckStockinController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:edit')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:edit')")
|
||||||
@Log(title = "盘库单据主信息", businessType = BusinessType.UPDATE)
|
@Log(title = "盘库单据主信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody CheckStockin checkStockin)
|
public AjaxResult edit(@RequestBody CheckStockin checkStockin) {
|
||||||
{
|
|
||||||
return checkStockinService.updateCheckStockin(checkStockin);
|
return checkStockinService.updateCheckStockin(checkStockin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,9 +96,8 @@ public class CheckStockinController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:remove')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:remove')")
|
||||||
@Log(title = "盘库单据主信息", businessType = BusinessType.DELETE)
|
@Log(title = "盘库单据主信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{stockGuids}")
|
@DeleteMapping("/{stockGuids}")
|
||||||
public AjaxResult remove(@PathVariable String[] stockGuids)
|
public AjaxResult remove(@PathVariable String[] stockGuids) {
|
||||||
{
|
|
||||||
return toAjax(checkStockinService.deleteCheckStockinByStockGuids(stockGuids));
|
return toAjax(checkStockinService.deleteCheckStockinByStockGuids(stockGuids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,12 +112,15 @@ public class CheckStockinController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:saveBill')")
|
@PreAuthorize("@ss.hasPermi('check:stockCheck:saveBill')")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult saveBill(@RequestBody CheckStockVo checkStockVo) {
|
public AjaxResult saveBill(@RequestBody CheckStockVo checkStockVo) {
|
||||||
String stockOutId = checkStockinService.saveBill(checkStockVo);
|
return checkStockinService.saveBill(checkStockVo);
|
||||||
return AjaxResult.success(stockOutId);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 盘点自动分配
|
* 盘点自动分配
|
||||||
|
*
|
||||||
* @param checkStockin
|
* @param checkStockin
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public interface ICheckStockinService
|
|||||||
*/
|
*/
|
||||||
public int deleteCheckStockinByStockGuid(String stockGuid);
|
public int deleteCheckStockinByStockGuid(String stockGuid);
|
||||||
|
|
||||||
String saveBill(CheckStockVo outStockoutVo);
|
AjaxResult saveBill(CheckStockVo outStockoutVo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 盘点自动分配
|
* 盘点自动分配
|
||||||
|
|||||||
@@ -162,9 +162,8 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String saveBill(CheckStockVo checkStockVo) {
|
public AjaxResult saveBill(CheckStockVo checkStockVo) {
|
||||||
CheckStockin checkStockin = checkStockVo.getCheckStockin();
|
CheckStockin checkStockin = checkStockVo.getCheckStockin();
|
||||||
|
|
||||||
List<CheckStockinDetail> detailList = checkStockVo.getDetailList();
|
List<CheckStockinDetail> detailList = checkStockVo.getDetailList();
|
||||||
String stockCheckId = basJobIdService.getJobId("PDD");
|
String stockCheckId = basJobIdService.getJobId("PDD");
|
||||||
checkStockin.setStockCheckId(stockCheckId);
|
checkStockin.setStockCheckId(stockCheckId);
|
||||||
@@ -183,6 +182,9 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
|||||||
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
|
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
|
||||||
checkStockinDetail.setStockCheckId(stockCheckId);
|
checkStockinDetail.setStockCheckId(stockCheckId);
|
||||||
BasProduct basProduct = productService.selectBasProductByProductId(checkStockinDetail.getProductId());
|
BasProduct basProduct = productService.selectBasProductByProductId(checkStockinDetail.getProductId());
|
||||||
|
if (basProduct==null){
|
||||||
|
throw new RuntimeException(checkStockinDetail.getProductId()+",系统内无该物料,请检查!");
|
||||||
|
}
|
||||||
checkStockinDetail.setProductGuid(basProduct.getProductGuid());
|
checkStockinDetail.setProductGuid(basProduct.getProductGuid());
|
||||||
checkStockinDetail.setStockCheckGuid(checkStockin.getStockGuid());
|
checkStockinDetail.setStockCheckGuid(checkStockin.getStockGuid());
|
||||||
checkStockinDetail.setScanNum("0");
|
checkStockinDetail.setScanNum("0");
|
||||||
@@ -193,13 +195,6 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
|||||||
} else if ("2".equals(checkStockin.getCheckType())) {
|
} else if ("2".equals(checkStockin.getCheckType())) {
|
||||||
//货位盘点
|
//货位盘点
|
||||||
for (int i = 0; i < detailList.size(); i++) {
|
for (int i = 0; i < detailList.size(); i++) {
|
||||||
// BasStock param = new BasStock();
|
|
||||||
// param.setCargoSpaceId(detailList.get(i).getSpare1());
|
|
||||||
// List<BasStock> basStocks = basStockService.selectBasStockList(param);
|
|
||||||
// Integer quantity = 0;
|
|
||||||
// for (BasStock basStock : basStocks) {
|
|
||||||
// quantity += Convert.toInt(basStock.getQuantity());
|
|
||||||
// }
|
|
||||||
CheckStockinDetail checkStockinDetail = detailList.get(i);
|
CheckStockinDetail checkStockinDetail = detailList.get(i);
|
||||||
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
|
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
|
||||||
checkStockinDetail.setStockCheckId(stockCheckId);
|
checkStockinDetail.setStockCheckId(stockCheckId);
|
||||||
@@ -211,7 +206,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkStockinMapper.insertCheckStockin(checkStockin);
|
checkStockinMapper.insertCheckStockin(checkStockin);
|
||||||
return stockCheckId;
|
return AjaxResult.success("单据创建成功",stockCheckId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -193,6 +193,16 @@ public class PdaController extends BaseController {
|
|||||||
return iToWcsService.insertAgvMoveJob(agvMoveParam);
|
return iToWcsService.insertAgvMoveJob(agvMoveParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/hcoutMakesure")
|
||||||
|
@ResponseBody
|
||||||
|
@Log(title = "手持机缓存出库确认",businessType = BusinessType.OTHER)
|
||||||
|
public AjaxResult hcoutMakesure(String trayCode ){
|
||||||
|
|
||||||
|
return pdaService.hcoutMakesure(trayCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,4 +38,6 @@ public interface PdaMapper {
|
|||||||
void pkOut(HashMap<String, Object> map);
|
void pkOut(HashMap<String, Object> map);
|
||||||
|
|
||||||
void outMakeSureException(HashMap<String, Object> map);
|
void outMakeSureException(HashMap<String, Object> map);
|
||||||
|
|
||||||
|
void hcoutMakesure(HashMap<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,4 +58,5 @@ public interface PdaService {
|
|||||||
|
|
||||||
List<AgvPoint> selectAgvPointByType(String type);
|
List<AgvPoint> selectAgvPointByType(String type);
|
||||||
|
|
||||||
|
AjaxResult hcoutMakesure(String trayCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,4 +300,18 @@ public class PdaServiceImp implements PdaService {
|
|||||||
agvPoint.setType(type);
|
agvPoint.setType(type);
|
||||||
return agvPointService.selectAgvPointList(agvPoint);
|
return agvPointService.selectAgvPointList(agvPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult hcoutMakesure(String trayCode) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("v_tray_code", trayCode);
|
||||||
|
pdaMapper.hcoutMakesure(map);
|
||||||
|
String result = map.get("v_result").toString();
|
||||||
|
if ("10".equals(result)) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error(map.get("v_resultmsg").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,10 +243,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectMydoJobByEntranceId" parameterType="MydoJob" resultMap="MydoJobResult">
|
<select id="selectMydoJobByEntranceId" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||||
select top(1)* from mydo_job mj
|
select top(1)* from mydo_job mj
|
||||||
where in_or_out<20 and mj.entrance_id = #{entranceId}
|
where in_or_out<20
|
||||||
and mj.status = #{status}
|
and mj.tray_code = #{trayCode}
|
||||||
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
|
<!-- <if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>-->
|
||||||
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
|
<!-- <if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>-->
|
||||||
order by mj.create_time
|
order by mj.create_time
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -181,8 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{status,mode=IN,jdbcType=VARCHAR},
|
#{status,mode=IN,jdbcType=VARCHAR},
|
||||||
#{newStatus,mode=IN,jdbcType=VARCHAR},
|
#{newStatus,mode=IN,jdbcType=VARCHAR},
|
||||||
#{exitId,mode=IN,jdbcType=VARCHAR},
|
#{exitId,mode=IN,jdbcType=VARCHAR},
|
||||||
#{v_result,mode=OUT,jdbcType=VARCHAR},
|
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -144,4 +144,15 @@
|
|||||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||||
)}
|
)}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="hcoutMakesure" parameterType="java.util.Map" statementType="CALLABLE">
|
||||||
|
|
||||||
|
{call proc_hc_out_make_sure(
|
||||||
|
#{v_tray_code,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||||
|
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||||
|
)}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -670,9 +670,15 @@ export default {
|
|||||||
console.log(data)
|
console.log(data)
|
||||||
// 这里需要调用保存接口
|
// 这里需要调用保存接口
|
||||||
saveCheckStock(data).then(response => {
|
saveCheckStock(data).then(response => {
|
||||||
|
if (response.code==200){
|
||||||
|
this.$modal.msgSuccess('保存成功:' + response.msg);
|
||||||
|
this.$tab.refreshPage(this.$route);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$modal.msgError('建单失败:' + response.msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.$modal.msgSuccess('保存成功:' + response.msg);
|
|
||||||
this.$tab.refreshPage(this.$route);
|
|
||||||
// this.reset();
|
// this.reset();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user