修改任务开始条件

This commit is contained in:
liuhanqing
2025-07-23 11:05:05 +08:00
parent 597bb18b97
commit 302cddef41
9 changed files with 87 additions and 37 deletions

View File

@@ -36,6 +36,18 @@ public class ToWmsApiController {
return ajaxResult; return ajaxResult;
} }
/**
* 接收开始信号
*/
@PostMapping("/startSignal")
public AjaxResult startSignal(@RequestBody MydoJob mydoJob) {
AjaxResult ajaxResult = toWmsService.startSignal(mydoJob);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(mydoJob), "startSignal");
requestLog.setResponseBody(Convert.toStr(ajaxResult.get("msg")));
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
/** /**
* 入库、出库 任务完成回传 * 入库、出库 任务完成回传
* Map<String, String> * Map<String, String>

View File

@@ -20,4 +20,6 @@ public interface IToWmsService {
AjaxResult reMaterial(MydoJob mydoJob); AjaxResult reMaterial(MydoJob mydoJob);
AjaxResult getJob(MydoJob mydoJob); AjaxResult getJob(MydoJob mydoJob);
AjaxResult startSignal(MydoJob mydoJob);
} }

View File

@@ -56,8 +56,8 @@ public class ToWcsServiceImpl implements IToWcsService {
for (MydoJob outMydoJob : outMydoJobs) { for (MydoJob outMydoJob : outMydoJobs) {
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(outMydoJob), "推送出库任务"); RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(outMydoJob), "推送出库任务");
if ("1".equals(requestLog.getIsSuccessful())){ if ("1".equals(requestLog.getIsSuccessful())){
outMydoJob.setStatus("3"); outMydoJob.setStatus("2");
outMydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date())); //outMydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
mydoJobService.updateMydoJob(outMydoJob); mydoJobService.updateMydoJob(outMydoJob);
} }
} }

View File

@@ -84,8 +84,7 @@ public class ToWmsServiceImpl implements IToWmsService {
if ("1".equals(mydoJob.getExecutionPhase())){ if ("1".equals(mydoJob.getExecutionPhase())){
mydoJob.setExecutionPhase("2"); mydoJob.setExecutionPhase("2");
mydoJob.setEntranceId(param.getEntranceId()); mydoJob.setEntranceId(param.getEntranceId());
mydoJob.setStatus("3"); mydoJob.setStatus("2");
mydoJob.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
mydoJobService.updateMydoJob(mydoJob); mydoJobService.updateMydoJob(mydoJob);
} }
return AjaxResult.success(mydoJob); return AjaxResult.success(mydoJob);
@@ -222,4 +221,21 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.success(mydoJobs); return AjaxResult.success(mydoJobs);
} }
} }
@Override
public AjaxResult startSignal(MydoJob mydoJob) {
MydoJob mydoJobParam = new MydoJob();
mydoJobParam.setTaskNo(mydoJob.getTaskNo());
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
if (mydoJobs.isEmpty()){
return AjaxResult.error("没有该作业");
}else {
for (MydoJob mydoJob1 : mydoJobs) {
mydoJob1.setStatus("3");
mydoJob1.setStartTime(DateUtil.formatDateTime(DateUtil.date()));
mydoJobService.updateMydoJob(mydoJob1);
}
return AjaxResult.success("开始作业成功");
}
}
} }

View File

@@ -29,34 +29,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectCheckStockinVo"> <sql id="selectCheckStockinVo">
select stock_guid, stock_check_id, check_type, create_date, create_man_id, status, cs.warehouse_id, finish_date, erp_bill, stock_source, department_no, customer_no, class_no, supplier_no, spare1, spare2, spare3, spare4, spare5 , select cs.stock_guid,
bw.warehouse_name, sd.dept_name as department_name cs.stock_check_id,
cs.check_type,
cs.create_date,
cs.create_man_id,
cs.status,
cs.warehouse_id,
cs.finish_date,
cs.erp_bill,
cs.stock_source,
cs.department_no,
cs.customer_no,
cs.class_no,
cs.supplier_no,
cs.spare1,
cs.spare2,
cs.spare3,
cs.spare4,
cs.spare5,
bw.warehouse_name,
sd.dept_name as department_name
from check_stockin cs from check_stockin cs
left join bas_warehouse bw on cs.warehouse_id = bw.warehouse_id left join bas_warehouse bw on cs.warehouse_id = bw.warehouse_id
left join sys_dept sd on cs.department_no = sd.dept_id left join sys_dept sd on cs.department_no = sd.dept_id
</sql> </sql>
<select id="selectCheckStockinList" parameterType="CheckStockin" resultMap="CheckStockinResult"> <select id="selectCheckStockinList" parameterType="CheckStockin" resultMap="CheckStockinResult">
<include refid="selectCheckStockinVo"/> <include refid="selectCheckStockinVo"/>
<where> <where>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if> <if test="stockCheckId != null and stockCheckId != ''"> and cs.stock_check_id = #{stockCheckId}</if>
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if> <if test="checkType != null and checkType != ''"> and cs.check_type = #{checkType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if> <if test="createDate != null and createDate != ''"> and cs.create_date = #{createDate}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if> <if test="createManId != null and createManId != ''"> and cs.create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="status != null and status != ''"> and cs.status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and cs.warehouse_id = #{warehouseId}</if> <if test="warehouseId != null and warehouseId != ''"> and cs.warehouse_id = #{warehouseId}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if> <if test="finishDate != null and finishDate != ''"> and cs.finish_date = #{finishDate}</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if> <if test="erpBill != null and erpBill != ''"> and cs.erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if> <if test="stockSource != null and stockSource != ''"> and cs.stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if> <if test="departmentNo != null and departmentNo != ''"> and cs.department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if> <if test="customerNo != null and customerNo != ''"> and cs.customer_no = #{customerNo}</if>
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if> <if test="classNo != null and classNo != ''"> and cs.class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if> <if test="supplierNo != null and supplierNo != ''"> and cs.supplier_no = #{supplierNo}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if> <if test="spare1 != null and spare1 != ''"> and cs.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if> <if test="spare2 != null and spare2 != ''"> and cs.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if> <if test="spare3 != null and spare3 != ''"> and cs.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if> <if test="spare4 != null and spare4 != ''"> and cs.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if> <if test="spare5 != null and spare5 != ''"> and cs.spare5 = #{spare5}</if>
</where> </where>
</select> </select>

View File

@@ -450,7 +450,8 @@ export default {
onlyReviewedCanConfirm: 'Only reviewed documents can be confirmed', onlyReviewedCanConfirm: 'Only reviewed documents can be confirmed',
autoAllocation:'autoAllocation', autoAllocation:'autoAllocation',
autoAllocationSuccess:"autoAllocationSuccess", autoAllocationSuccess:"autoAllocationSuccess",
checkPort:'checkPort' checkPort:'checkPort',
departmentName: 'departmentName',
}, },
// ***************盘点入库作业************* // ***************盘点入库作业*************
checkJobIn: { checkJobIn: {

View File

@@ -430,7 +430,8 @@ export default {
cargoSpaceName: '货位名称', cargoSpaceName: '货位名称',
autoAllocation:'自动分配', autoAllocation:'自动分配',
autoAllocationSuccess:"自动分配成功", autoAllocationSuccess:"自动分配成功",
checkPort:'盘点出口' checkPort:'盘点出口',
departmentName: '部门名称',
}, },
// ***************盘点入库作业************* // ***************盘点入库作业*************
checkJobIn: { checkJobIn: {

View File

@@ -215,7 +215,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('checkStockCheck.warehouseId')" align="left" prop="warehouseName" /> <!-- 仓库ID --> <el-table-column :label="$t('checkStockCheck.warehouseId')" align="left" prop="warehouseName" /> <!-- 仓库ID -->
<el-table-column :label="$t('checkStockCheck.departmentNo')" align="left" prop="departmentNo" /> <!-- 部门编码 --> <el-table-column :label="$t('checkStockCheck.departmentName')" align="left" prop="departmentName" /> <!-- 部门编码 -->
<el-table-column :label="$t('checkStockCheck.createManId')" align="left" prop="createManId" /> <!-- 创建人 --> <el-table-column :label="$t('checkStockCheck.createManId')" align="left" prop="createManId" /> <!-- 创建人 -->
<el-table-column :label="$t('checkStockCheck.checkPort')" align="left" prop="spare1" /> <!-- 盘点位置 --> <el-table-column :label="$t('checkStockCheck.checkPort')" align="left" prop="spare1" /> <!-- 盘点位置 -->
<el-table-column :label="$t('checkStockCheck.createDate')" align="left" prop="createDate" /> <!-- 建立时间 --> <el-table-column :label="$t('checkStockCheck.createDate')" align="left" prop="createDate" /> <!-- 建立时间 -->
@@ -234,7 +234,6 @@
<el-table-column :label="$t('checkStockCheck.detailId')" align="left" prop="stockCheckDetailId" /> <!-- 子单ID --> <el-table-column :label="$t('checkStockCheck.detailId')" align="left" prop="stockCheckDetailId" /> <!-- 子单ID -->
<el-table-column :label="$t('checkStockCheck.mainId')" align="left" prop="stockCheckId" /> <!-- 主单ID --> <el-table-column :label="$t('checkStockCheck.mainId')" align="left" prop="stockCheckId" /> <!-- 主单ID -->
<el-table-column :label="$t('checkStockCheck.cargoSpaceName')" align="left" prop="cargoSpaceName" /> <!-- 货位名称 --> <el-table-column :label="$t('checkStockCheck.cargoSpaceName')" align="left" prop="cargoSpaceName" /> <!-- 货位名称 -->
<el-table-column :label="$t('checkStockCheck.lotNo')" align="left" prop="lotNo"/> <!-- 批次号 -->
<el-table-column :label="$t('checkStockCheck.productId')" align="left" prop="productId"/> <!-- 物料编码 --> <el-table-column :label="$t('checkStockCheck.productId')" align="left" prop="productId"/> <!-- 物料编码 -->
<el-table-column :label="$t('checkStockCheck.materialDesc')" align="left" prop="extraField.materialDesc"/> <!-- 物料描述 --> <el-table-column :label="$t('checkStockCheck.materialDesc')" align="left" prop="extraField.materialDesc"/> <!-- 物料描述 -->
<el-table-column :label="$t('checkStockCheck.englishDesc')" align="left" prop="extraField.englishDesc"/> <!-- 英文描述 --> <el-table-column :label="$t('checkStockCheck.englishDesc')" align="left" prop="extraField.englishDesc"/> <!-- 英文描述 -->