盘点自动分配测试
This commit is contained in:
@@ -130,10 +130,10 @@ public class CheckStockinController extends BaseController
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "盘点自动分配", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/autoAllocation")
|
||||
@GetMapping("/autoAllocation")
|
||||
@PreAuthorize("@ss.hasPermi('check:stockCheck:autoAllocation')")
|
||||
@ResponseBody
|
||||
public AjaxResult autoAllocation(@RequestBody CheckStockin checkStockin) {
|
||||
public AjaxResult autoAllocation(CheckStockin checkStockin) {
|
||||
return checkStockinService.autoAllocation(checkStockin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.Map;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
import com.ruoyi.bas.basJobId.service.IBasJobIdService;
|
||||
@@ -222,13 +223,17 @@ public class CheckStockinServiceImpl implements ICheckStockinService
|
||||
|
||||
@Override
|
||||
public AjaxResult autoAllocation(CheckStockin checkStockin) {
|
||||
CheckStockin currentCheckStock = selectCheckStockinByStockGuid(checkStockin.getStockGuid());
|
||||
if (ObjUtil.isNull(currentCheckStock)){
|
||||
return AjaxResult.warn("单据不存在!");
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("v_stock_check_id", checkStockin.getStockCheckId());
|
||||
map.put("v_stock_check_id", currentCheckStock.getStockCheckId());
|
||||
checkStockinMapper.autoAllot(map);
|
||||
if ("10".equals(map.get("v_result"))){
|
||||
return AjaxResult.success("自动分配成功");
|
||||
}else {
|
||||
return AjaxResult.warn(map.get("v_resultString"));
|
||||
return AjaxResult.warn(map.get("v_resultmsg"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class InMydoJobController extends BaseController
|
||||
{
|
||||
startPage();
|
||||
List<MydoJob> list = null;
|
||||
mydoJob.setInOut("1");
|
||||
//mydoJob.setInOut("1");
|
||||
if(Integer.parseInt(mydoJob.getStatus())<4) {
|
||||
list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
}else{
|
||||
|
||||
@@ -38,7 +38,7 @@ public class OutMydoJobController extends BaseController {
|
||||
public TableDataInfo list(MydoJob mydoJob)
|
||||
{
|
||||
startPage();
|
||||
mydoJob.setInOut("2");
|
||||
//mydoJob.setInOut("2");
|
||||
List<MydoJob> list = new ArrayList<>();
|
||||
if(Integer.parseInt(mydoJob.getStatus())<4) {
|
||||
list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
|
||||
@@ -35,7 +35,7 @@ spring:
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM sys_oper_log
|
||||
validationQuery: SELECT 1 FROM sys_user
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
|
||||
@@ -65,9 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="autoAllot" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{
|
||||
call proc_check_auto_allocation(
|
||||
#{v_stockout_detail_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_stock_check_id,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=VARCHAR},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
|
||||
)
|
||||
}
|
||||
</select>
|
||||
|
||||
@@ -86,6 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="faultFlag != null and faultFlag != ''"> and mj.fault_flag = #{faultFlag}</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='2'.toString "> and mj.in_or_out >=20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='1'.toString "> and mj.in_or_out < 20</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='3'.toString "> and mj.in_or_out in (5,6)</if>
|
||||
<if test="inOut != null and inOut != '' and inOut =='4'.toString "> and mj.in_or_out in (25,26)</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user