Compare commits
3 Commits
d9da0de59e
...
10fa4b3b15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10fa4b3b15 | ||
|
|
f25bb2a549 | ||
|
|
e65b5933ad |
@@ -27,8 +27,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/check/stockCheck")
|
||||
public class CheckStockinController extends BaseController
|
||||
{
|
||||
public class CheckStockinController extends BaseController {
|
||||
@Autowired
|
||||
private ICheckStockinService checkStockinService;
|
||||
@Autowired
|
||||
@@ -39,8 +38,7 @@ public class CheckStockinController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CheckStockin checkStockin)
|
||||
{
|
||||
public TableDataInfo list(CheckStockin checkStockin) {
|
||||
startPage();
|
||||
List<CheckStockin> list = new ArrayList<>();
|
||||
if (checkStockin.getStatus() == null || Convert.toInt(checkStockin.getStatus()) < 4) {
|
||||
@@ -58,8 +56,7 @@ public class CheckStockinController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:export')")
|
||||
@Log(title = "盘库单据主信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CheckStockin checkStockin)
|
||||
{
|
||||
public void export(HttpServletResponse response, CheckStockin checkStockin) {
|
||||
List<CheckStockin> list = checkStockinService.selectCheckStockinList(checkStockin);
|
||||
ExcelUtil<CheckStockin> util = new ExcelUtil<CheckStockin>(CheckStockin.class);
|
||||
util.exportExcel(response, list, "盘库单据主信息数据");
|
||||
@@ -70,8 +67,7 @@ public class CheckStockinController extends BaseController
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:query')")
|
||||
@GetMapping(value = "/{stockGuid}")
|
||||
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("stockGuid") String stockGuid) {
|
||||
return success(checkStockinService.selectCheckStockinByStockGuid(stockGuid));
|
||||
}
|
||||
|
||||
@@ -81,8 +77,7 @@ public class CheckStockinController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:add')")
|
||||
@Log(title = "盘库单据主信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CheckStockin checkStockin)
|
||||
{
|
||||
public AjaxResult add(@RequestBody CheckStockin checkStockin) {
|
||||
return toAjax(checkStockinService.insertCheckStockin(checkStockin));
|
||||
}
|
||||
|
||||
@@ -92,8 +87,7 @@ public class CheckStockinController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:edit')")
|
||||
@Log(title = "盘库单据主信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody CheckStockin checkStockin)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody CheckStockin checkStockin) {
|
||||
return checkStockinService.updateCheckStockin(checkStockin);
|
||||
}
|
||||
|
||||
@@ -103,8 +97,7 @@ public class CheckStockinController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:remove')")
|
||||
@Log(title = "盘库单据主信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockGuids}")
|
||||
public AjaxResult remove(@PathVariable String[] stockGuids)
|
||||
{
|
||||
public AjaxResult remove(@PathVariable String[] stockGuids) {
|
||||
return toAjax(checkStockinService.deleteCheckStockinByStockGuids(stockGuids));
|
||||
}
|
||||
|
||||
@@ -119,12 +112,15 @@ public class CheckStockinController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:saveBill')")
|
||||
@ResponseBody
|
||||
public AjaxResult saveBill(@RequestBody CheckStockVo checkStockVo) {
|
||||
String stockOutId = checkStockinService.saveBill(checkStockVo);
|
||||
return AjaxResult.success(stockOutId);
|
||||
return checkStockinService.saveBill(checkStockVo);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 盘点自动分配
|
||||
*
|
||||
* @param checkStockin
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ public interface ICheckStockinService
|
||||
*/
|
||||
public int deleteCheckStockinByStockGuid(String stockGuid);
|
||||
|
||||
String saveBill(CheckStockVo outStockoutVo);
|
||||
AjaxResult saveBill(CheckStockVo outStockoutVo);
|
||||
|
||||
/**
|
||||
* 盘点自动分配
|
||||
|
||||
@@ -162,9 +162,8 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String saveBill(CheckStockVo checkStockVo) {
|
||||
public AjaxResult saveBill(CheckStockVo checkStockVo) {
|
||||
CheckStockin checkStockin = checkStockVo.getCheckStockin();
|
||||
|
||||
List<CheckStockinDetail> detailList = checkStockVo.getDetailList();
|
||||
String stockCheckId = basJobIdService.getJobId("PDD");
|
||||
checkStockin.setStockCheckId(stockCheckId);
|
||||
@@ -183,6 +182,9 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
||||
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
|
||||
checkStockinDetail.setStockCheckId(stockCheckId);
|
||||
BasProduct basProduct = productService.selectBasProductByProductId(checkStockinDetail.getProductId());
|
||||
if (basProduct==null){
|
||||
throw new RuntimeException(checkStockinDetail.getProductId()+",系统内无该物料,请检查!");
|
||||
}
|
||||
checkStockinDetail.setProductGuid(basProduct.getProductGuid());
|
||||
checkStockinDetail.setStockCheckGuid(checkStockin.getStockGuid());
|
||||
checkStockinDetail.setScanNum("0");
|
||||
@@ -193,13 +195,6 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
||||
} else if ("2".equals(checkStockin.getCheckType())) {
|
||||
//货位盘点
|
||||
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.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
|
||||
checkStockinDetail.setStockCheckId(stockCheckId);
|
||||
@@ -211,7 +206,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
|
||||
}
|
||||
|
||||
checkStockinMapper.insertCheckStockin(checkStockin);
|
||||
return stockCheckId;
|
||||
return AjaxResult.success("单据创建成功",stockCheckId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -193,6 +193,16 @@ public class PdaController extends BaseController {
|
||||
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 outMakeSureException(HashMap<String, Object> map);
|
||||
|
||||
void hcoutMakesure(HashMap<String, Object> map);
|
||||
}
|
||||
|
||||
@@ -58,4 +58,5 @@ public interface PdaService {
|
||||
|
||||
List<AgvPoint> selectAgvPointByType(String type);
|
||||
|
||||
AjaxResult hcoutMakesure(String trayCode);
|
||||
}
|
||||
|
||||
@@ -300,4 +300,18 @@ public class PdaServiceImp implements PdaService {
|
||||
agvPoint.setType(type);
|
||||
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 top(1)* from mydo_job mj
|
||||
where in_or_out<20 and mj.entrance_id = #{entranceId}
|
||||
and mj.status = #{status}
|
||||
<if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>
|
||||
<if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>
|
||||
where in_or_out<20
|
||||
and mj.tray_code = #{trayCode}
|
||||
<!-- <if test="lineId != null and lineId != ''"> and mj.line_id = #{lineId}</if>-->
|
||||
<!-- <if test="workshopId != null and workshopId != ''"> and mj.workshop_id = #{workshopId}</if>-->
|
||||
order by mj.create_time
|
||||
</select>
|
||||
|
||||
|
||||
@@ -181,8 +181,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{status,mode=IN,jdbcType=VARCHAR},
|
||||
#{newStatus,mode=IN,jdbcType=VARCHAR},
|
||||
#{exitId,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=VARCHAR},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
#{v_result,mode=OUT,jdbcType=INTEGER},
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)
|
||||
}
|
||||
</select>
|
||||
|
||||
@@ -144,4 +144,15 @@
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)}
|
||||
</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>
|
||||
|
||||
@@ -670,9 +670,15 @@ export default {
|
||||
console.log(data)
|
||||
// 这里需要调用保存接口
|
||||
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.reset();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user