盘点自动分配测试

This commit is contained in:
liuhanqing
2025-06-23 11:22:50 +08:00
parent afb022d365
commit 7defbe45ff
16 changed files with 965 additions and 488 deletions

View File

@@ -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);
}
}

View File

@@ -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"));
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -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 &lt; 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>