This commit is contained in:
1009473166@qq.com
2026-07-31 10:16:48 +08:00
parent 2b86d14f56
commit 0a021caba6
187 changed files with 8938 additions and 2072 deletions

View File

@@ -54,6 +54,12 @@
<artifactId>ruoyi-generator</artifactId>
</dependency>
<!-- 授权码模块 -->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-license</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-openai</artifactId>

View File

@@ -1,9 +1,11 @@
package com.ruoyi;
import java.security.Security;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
@@ -17,6 +19,7 @@ public class RuoYiApplication
{
public static void main(String[] args)
{
enableSqlServerLegacyTls();
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("""
@@ -24,4 +27,25 @@ public class RuoYiApplication
This is a text block with Unicode characters.
""");
}
private static void enableSqlServerLegacyTls()
{
if (!Boolean.parseBoolean(System.getProperty("ruoyi.sqlserver.legacyTls.enabled", "true")))
{
return;
}
String propertyName = "jdk.tls.disabledAlgorithms";
String disabledAlgorithms = Security.getProperty(propertyName);
if (disabledAlgorithms == null || disabledAlgorithms.isBlank())
{
return;
}
String compatibleAlgorithms = Arrays.stream(disabledAlgorithms.split(","))
.map(String::trim)
.filter(algorithm -> !"TLSv1".equalsIgnoreCase(algorithm))
.collect(Collectors.joining(", "));
Security.setProperty(propertyName, compatibleAlgorithms);
}
}

View File

@@ -1,13 +1,19 @@
package com.ruoyi.api.controller;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
import com.ruoyi.api.service.IToErpService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.log.service.IRequestLogService;
import com.ruoyi.pda.mapper.PdaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.api.domain.DeliveryNoticeVo;
import java.util.HashMap;
/**
* 作业统计 Controller
*/
@@ -19,6 +25,8 @@ public class ToErpApiController {
private IToErpService toErpService;
@Autowired
private IRequestLogService requestLogService;
@Autowired
private PdaMapper pdaMapper;
/**
* 接收入出库通知单
@@ -28,7 +36,7 @@ public class ToErpApiController {
public AjaxResult receiveDeliveryNotice(@RequestBody DeliveryNoticeVo deliveryNoticeVo) {
AjaxResult ajaxResult = toErpService.receiveDeliveryNotice(deliveryNoticeVo);
requestLogService.insertRequestLog(requestLogService.getRequestLog(deliveryNoticeVo.toString(), "接收入出库通知单", ajaxResult));
requestLogService.insertRequestLog(requestLogService.getRequestLogERP(JSONUtil.toJsonStr(deliveryNoticeVo), "接收入出库通知单", ajaxResult));
return ajaxResult;
@@ -36,22 +44,107 @@ public class ToErpApiController {
/**
* 回传其他入库单
* 回传入库单
*/
// @Scheduled(fixedDelay = 1500)
@Scheduled(fixedDelay = 1500)
@RequestMapping("/callbackInDeliveryNotice")
@ResponseBody
public void callbackInDeliveryNotice() {
toErpService.callbackInDeliveryNotice();
public void callbackInDeliveryNoticeNew() {
toErpService.callbackInDeliveryNoticeNew();
}
/**
* 回传出库单(新)
*/
@Scheduled(fixedDelay = 1500)
@RequestMapping("/callbackOutDeliveryNotice")
@ResponseBody
public void callbackDeliveryOutNoticeNew() {
toErpService.callbackDeliveryOutNoticeNew();
}
// @Scheduled(fixedDelay = 1500)
// @RequestMapping("/callbackOutDeliveryNotice")
// @ResponseBody
// public void callbackDeliveryOutNoticeNewS() {
// toErpService.callbackDeliveryOutNoticeNews();
// }
// /**
// * 回传其他入库单
// */
// @Scheduled(fixedDelay = 1500)
// @RequestMapping("/callbackInDeliveryNotice")
// @ResponseBody
// public void callbackInDeliveryNotice() {
// toErpService.callbackInDeliveryNotice();
// }
//
// /**
// * 回传其他出库单
// */
// @Scheduled(fixedDelay = 1500)
// @RequestMapping("/callbackOutDeliveryNotice")
// @ResponseBody
// public void callbackDeliveryOutNotice() {
// toErpService.callbackoutDeliveryNotice();
// }
/**
* 移库回调接口
*/
@Scheduled(fixedDelay = 1500)
@RequestMapping("/moveCargoSpace")
@ResponseBody
public void moveCargoSpace() {
toErpService.moveCargoSpace();
}
/**
* 回传其他出库单
* 自动确认入库单据
*/
@RequestMapping("/callbackOutDeliveryNotice")
@Scheduled(fixedDelay = 10000)
// @RequestMapping("/FillFinishAllot")
@ResponseBody
public void callbackDeliveryOutNotice() {
toErpService.callbackoutDeliveryNotice();
public void FillFinishAllot() {
HashMap<String, Object> map = new HashMap<>();
map.put("v_result", null);
map.put("v_result_msg", null);
pdaMapper.FillFinishAllot(map);
String result = map.get("v_result").toString();
String msg = map.get("v_result_msg").toString();
if ("10".equals(result)) {
System.err.println(msg);
} else {
// System.err.println(msg);
}
}
/**
* 自动确认出库单据
*/
@Scheduled(fixedDelay = 10000)
// @RequestMapping("/FillFinishAllot")
@ResponseBody
public void FillFinishAllotOut() {
HashMap<String, Object> map = new HashMap<>();
map.put("v_result", null);
map.put("v_result_msg", null);
pdaMapper.FillFinishAllotOut(map);
String result = map.get("v_result").toString();
String msg = map.get("v_result_msg").toString();
if ("10".equals(result)) {
System.err.println(msg);
} else {
// System.err.println(msg);
}
}
}

View File

@@ -1,5 +1,6 @@
package com.ruoyi.api.controller;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.domain.ErpProduct;
import com.ruoyi.api.domain.ReMaterialParam;
@@ -11,6 +12,10 @@ import com.ruoyi.bas.BasProduct.service.IBasProductService;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.agv.domain.AgvContainerTask;
import com.ruoyi.device.agv.service.IAgvContainerTaskService;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.job.mydojob.mapper.MydoJobMapper;
import com.ruoyi.log.domain.RequestLog;
import com.ruoyi.log.service.IRequestLogService;
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
@@ -19,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
import java.util.*;
/**
* 作业统计 Controller
@@ -36,6 +41,10 @@ public class ToWmsApiController {
private IOutStockoutService outStockoutService;
@Autowired
private IBasProductService basProductService;
@Autowired
private MydoJobMapper mapper;
@Autowired
private IAgvContainerTaskService agvContainerTaskService;
/**
* 入库请求生成作业
@@ -43,18 +52,50 @@ public class ToWmsApiController {
@PostMapping("/requestEnterByTrayCode")
public AjaxResult requestEnterByTrayCode(@RequestBody RequestEnter requestEnter) {
AjaxResult ajaxResult = toWmsService.requestEnterByTrayCode(requestEnter);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "入库任务创建请求",ajaxResult);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "入库任务创建请求", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
// 入库分货位
@PostMapping("/sendCargoSpace")
public AjaxResult sendCargoSpace(@RequestBody RequestEnter requestEnter) {
AjaxResult ajaxResult = toWmsService.requestEnterByTaskNo(requestEnter);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "入库请求分配货位", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
// 出库到位更新LED显示屏
@PostMapping("/updateLed")
public AjaxResult updateLed(@RequestBody RequestEnter requestEnter) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_task_no", requestEnter.getTaskNo());
map.put("v_code", requestEnter.getDeviceCode());
mapper.updateLed(map);
return AjaxResult.success();
}
// 线体报警更新报警信息
@PostMapping("/updateLedError")
public AjaxResult updateLedError(@RequestBody RequestEnter requestEnter) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_code", requestEnter.getDeviceCode());
map.put("v_error_code", requestEnter.getErrorCode());
mapper.updateLedError(map);
return AjaxResult.success();
}
/**
* 请求补码作业
*/
@RequestMapping("/requestByNoTrayCode")
public AjaxResult requestByNoTrayCode(@RequestBody RequestEnter requestEnter) {
AjaxResult ajaxResult = toWmsService.selectMydoJobByEntranceId(requestEnter);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "请求补码作业",ajaxResult);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "请求补码作业", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
@@ -65,7 +106,7 @@ public class ToWmsApiController {
@RequestMapping("/requestEnterByTrayCodeAndEntranceId")
public AjaxResult requestEnterByTrayCodeAndEntranceId(@RequestBody RequestEnter requestEnter) {
AjaxResult ajaxResult = toWmsService.requestEnterByTrayCodeAndEntranceId(requestEnter);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "获取入库作业",ajaxResult);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(requestEnter), "获取入库作业", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
@@ -74,18 +115,17 @@ public class ToWmsApiController {
/**
* 入库、出库 任务完成回传
* Map<String, String>
* "wmsType": "任务类型" 1-入库 2-出库 3-agv搬运,
* taskNo:出库 入库任务号
* trayCode:托盘码
* positionCode1:起点
* positionCode2:终点
* containerCode:容器编码
*
* "wmsType": "任务类型" 1-入库 2-出库 3-agv搬运,
* taskNo:出库 入库任务号
* trayCode:托盘码
* positionCode1:起点
* positionCode2:终点
* containerCode:容器编码
*/
@PostMapping("/jobFinish")
public AjaxResult jobFinish(@RequestBody WmsJobRequest wmsJobRequest) {
AjaxResult ajaxResult = toWmsService.jobFinish(wmsJobRequest);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobRequest), "jobFinish",ajaxResult);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobRequest), "jobFinish", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
@@ -96,7 +136,7 @@ public class ToWmsApiController {
@PostMapping("/reAssign")
public AjaxResult reAssign(@RequestBody ReMaterialParam reMaterialParam) {
AjaxResult ajaxResult = toWmsService.reAssign(reMaterialParam);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "reAssign",ajaxResult);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "reAssign", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
@@ -107,13 +147,12 @@ public class ToWmsApiController {
@PostMapping("/reMaterial")
public AjaxResult reMaterial(@RequestBody ReMaterialParam reMaterialParam) {
AjaxResult ajaxResult = toWmsService.reMaterial(reMaterialParam);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "reMaterial",ajaxResult);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(reMaterialParam), "reMaterial", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
/**
* 出库单据保存
*
@@ -137,8 +176,7 @@ public class ToWmsApiController {
*/
@Log(title = "接收物料", businessType = BusinessType.INSERT)
@PutMapping("/receiveProduct")
public AjaxResult receiveProduct(@RequestBody ErpProduct erpProduct)
{
public AjaxResult receiveProduct(@RequestBody ErpProduct erpProduct) {
AjaxResult ajaxResult = toWmsService.receiveProduct(erpProduct);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(erpProduct), "接收物料", ajaxResult);
requestLogService.insertRequestLog(requestLog);
@@ -150,8 +188,7 @@ public class ToWmsApiController {
*/
@Log(title = "修改物料管理", businessType = BusinessType.UPDATE)
@PutMapping("/updateProduct")
public AjaxResult updateProduct(@RequestBody ErpProduct erpProduct)
{
public AjaxResult updateProduct(@RequestBody ErpProduct erpProduct) {
AjaxResult ajaxResult = toWmsService.updateProduct(erpProduct);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(erpProduct), "修改物料管理", ajaxResult);
requestLogService.insertRequestLog(requestLog);
@@ -163,12 +200,76 @@ public class ToWmsApiController {
*/
@Log(title = "作废物料", businessType = BusinessType.UPDATE)
@PutMapping("/InvalidProduct")
public AjaxResult InvalidProduct(@RequestBody ErpProduct erpProduct)
{
public AjaxResult InvalidProduct(@RequestBody ErpProduct erpProduct) {
AjaxResult ajaxResult = toWmsService.InvalidProduct(erpProduct);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(erpProduct), "作废物料", ajaxResult);
requestLogService.insertRequestLog(requestLog);
return ajaxResult;
}
/**
* 请求AGV执行队列
*/
// @Log(title = "请求未下发的AGV执行队列", businessType = BusinessType.OTHER)
@RequestMapping("/queryAgvQuene")
public AjaxResult queryAgvQuene() {
AgvContainerTask agvContainerTask = new AgvContainerTask();
agvContainerTask.setStatus("0");
List<AgvContainerTask> agvContainerTasks = agvContainerTaskService.selectAgvContainerTaskList(agvContainerTask);
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(""), "请求未下发的AGV执行队列", AjaxResult.success(agvContainerTasks));
requestLogService.insertRequestLog(requestLog);
if (agvContainerTasks != null && agvContainerTasks.size() > 0) {
for (AgvContainerTask containerTask : agvContainerTasks) {
containerTask.setStatus("1");
agvContainerTaskService.updateAgvContainerTask(containerTask);
}
return AjaxResult.success(agvContainerTasks.get(0));
} else {
return AjaxResult.error("无队列");
}
}
/**
* 请求AGV执行队列
*/
@Log(title = "完成AGV执行队列", businessType = BusinessType.UPDATE)
@RequestMapping("/finishAgvQuene")
public AjaxResult finishAgvQuene(@RequestBody JSONObject jsonObject) {
String order = (String) jsonObject.get("order");
agvContainerTaskService.deleteAgvJobByOrder(order);
return AjaxResult.success();
}
@Log(title = "自动生成Agv搬运队列到线边", businessType = BusinessType.INSERT)
@PutMapping("/insertAgvQuene")
public AjaxResult insertAgvQuene(@RequestBody WmsJobRequest wmsJobRequest) {
String taskNo = wmsJobRequest.getTaskNo();// 到位任务号
String code = wmsJobRequest.getCode();// 线体号
AgvContainerTask agvContainerTask = new AgvContainerTask();
agvContainerTask.setTaskNo(taskNo);
List<AgvContainerTask> agvContainerTasks = agvContainerTaskService.selectAgvContainerTaskList(agvContainerTask);
if (Objects.isNull(agvContainerTasks)) {
MydoJob mydoJob = new MydoJob();
mydoJob.setTaskNo(taskNo);
List<MydoJob> mydoJobs = mapper.selectMydoJobList(mydoJob);
AgvContainerTask agvContainerTask1 = new AgvContainerTask();
agvContainerTask1.setContainer(UUID.randomUUID().toString());
agvContainerTask1.setTaskNo(taskNo);
agvContainerTask1.setStartPoint(code);
agvContainerTask1.setEndPoint(mydoJobs.get(0).getEndPoint());//TODO 需要修改
agvContainerTask1.setSpare2(mydoJobs.get(0).getTrayCode());
// 10缓存区到线边 11立库到线边 12 立库到缓存区 13 缓存到立库
agvContainerTask1.setSpare1("11");
agvContainerTask1.setStatus("0");
agvContainerTaskService.insertAgvContainerTask(agvContainerTask1);
}
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobRequest), "自动生成Agv搬运队列到线边", AjaxResult.success());
requestLogService.insertRequestLog(requestLog);
return AjaxResult.success();
}
}

View File

@@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.annotation.Anonymous;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -23,6 +24,7 @@ public class TwinController {
@Autowired
private ITwinService twinService;
//获取所有货位
@Anonymous
@GetMapping("/getEmptyCargoSpace")
public AjaxResult getEmptyCargoSpace() {
@@ -30,10 +32,25 @@ public class TwinController {
return AjaxResult.success(list);
}
//获取统计信息
@Anonymous
@GetMapping("/getStockList")
public Map<String, Object> getStockList() {
return twinService.getStockListOverview();
}
//根据货位号获取库存中的物料信息
@Anonymous
@GetMapping("/getCargo/{cargoSpaceName}")
public Map<String, Object> getCargo(@PathVariable("cargoSpaceName") String cargoSpaceName) {
return twinService.getCargo(cargoSpaceName);
}
//根据任务号获取作业表中的物料信息
@Anonymous
@GetMapping("/getTaskCargo/{taskNo}")
public Map<String, Object> getTaskCargo(@PathVariable("taskNo") String taskNo) {
return twinService.getTaskCargo(taskNo);
}
}

View File

@@ -4,6 +4,9 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.w3c.dom.stylesheets.LinkStyle;
import java.util.List;
/**
* 出入库通知单-子表接收对象
@@ -42,7 +45,38 @@ public class DeliveryNoticeItemVo {
/** 备注 */
private String remark;
private List<LocationDetail> locations;
/**货位*/
private String area;
/**托盘*/
private String location;
private String areaBefore;
private String locationBefore;
/** 项目号 */
private String projectNo;
/**
* erp子表主键
***/
private String sourceLineId;
/**
* 条码号
***/
private String barCode;
/**
* 是否批次管理
**/
private String isBatchManage;
/**旧项目号**/
private String oldProjectNo;
/**组件号**/
private String groupNum;
/**存放地点 1 立库 2平库*/
private String stg_location;
}

View File

@@ -49,6 +49,17 @@ public class DeliveryNoticeVo {
private String warehouseId;
/** 备注 */
private String remark;
/** 配送终点 */
private String destination;
/** 领料车间 */
private String workshop;
private String companyShortName;
/** 账套号**/
private String accountSetNo;
/** 子表明细列表 */
private List<DeliveryNoticeItemVo> detailList;
}

View File

@@ -20,4 +20,8 @@ public class RequestEnter {
private String type;
private String flag;
private String taskNo;
private String deviceCode;
private String code;
private String errorCode;
}

View File

@@ -24,4 +24,6 @@ public class WmsJobRequest {
private String positionCode2;
//任务id
private String jobId;
//线体号
private String code;
}

View File

@@ -1,6 +1,7 @@
package com.ruoyi.api.service;
import com.ruoyi.api.domain.DeliveryNoticeVo;
import com.ruoyi.api.moveMsg.domain.MoveMsg;
import com.ruoyi.bas.BasProduct.domain.BasProduct;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -16,5 +17,13 @@ public interface IToErpService {
void callbackoutDeliveryNotice();
void moveCargoSpace();
AjaxResult createWorkshopInboundOrder(BasProduct basProduct);
void callbackInDeliveryNoticeNew();
void callbackDeliveryOutNoticeNew();
void callbackDeliveryOutNoticeNews();
}

View File

@@ -59,4 +59,6 @@ public interface IToWmsService {
* 作废物料
*/
AjaxResult InvalidProduct(ErpProduct erpProduct);
AjaxResult requestEnterByTaskNo(RequestEnter requestEnter);
}

View File

@@ -4,5 +4,7 @@ import java.util.Map;
public interface ITwinService {
Map<String, Object> getStockListOverview();
Map<String, Object> getCargo(String cargoSpaceName);
Map<String, Object> getTaskCargo(String taskNo);
}

View File

@@ -33,7 +33,7 @@ public class ToWcsServiceImpl implements IToWcsService {
@Autowired
private IAgvContainerTaskService agvContainerTaskService;
public static final String PUSH_OUT_MYDO_JOB = "http://localhost:8081/wcs2Wms/api/receiveOutMydoJob";
public static final String PUSH_OUT_MYDO_JOB = "http://192.168.188.236:8081/wcs2Wms/api/receiveOutMydoJob";
public static final String PUSH_IN_MYDO_JOB = "http://localhost:8081/wcs2Wms/api/receiveInMydoJob";
public static final String PUSH_AGV_MOVE_JOB = "http://localhost:8081/agv/api/receiveAgvMoveJob";
public static final String OUT_MYDOJOB_MS = "http://localhost:8081/wcs2Wms/api/outMydojobMakesure";
@@ -43,15 +43,12 @@ public class ToWcsServiceImpl implements IToWcsService {
@Override
// @Scheduled(fixedDelay=1500)
@Scheduled(fixedDelay=1500)
public void pushOutMydoJob() {
//查询所有未推送的料箱出库作业
MydoJob mydoJobParam = new MydoJob();
mydoJobParam.setStatus("1");
List<String> list = new ArrayList<>();
list.add("21");
list.add("26");
mydoJobParam.setInOutIds(list);
mydoJobParam.setInOut("2");
List<MydoJob> outMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
for (MydoJob outMydoJob : outMydoJobs) {
RequestLog requestLog = requestLogService.getRequestLog(PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(outMydoJob), "推送出库任务","wms","wcs");

View File

@@ -93,27 +93,29 @@ public class ToWmsServiceImpl implements IToWmsService {
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult requestEnterByTrayCode(RequestEnter requestEnter) {
String trayCode = requestEnter.getTrayCode();
MydoJob inJob = mydoJobMapper.selectInJobByTrayCode(trayCode);
if(inJob != null && Integer.parseInt(inJob.getInOrOut()) < 20){
if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
return AjaxResult.success(JSONUtil.toJsonStr(inJob));
}else{
//分配货位
HashMap<String, Object> map = new HashMap<>();
// if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
// return AjaxResult.success(inJob);
// }else{
// //分配货位
// HashMap<String, Object> map = new HashMap<>();
//
// map.put("v_tray_code", trayCode);
// mydoJobMapper.allotInJobSpace(map);
// if (!"10".equals(map.get("v_result").toString())) {
// return AjaxResult.error(map.get("v_resultmsg").toString());
// }else{
//
// }
// }
// MydoJob inJob2 = mydoJobMapper.selectInJobByTrayCode(trayCode);
return AjaxResult.success(inJob);
map.put("v_tray_code", trayCode);
mydoJobMapper.allotInJobSpace(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
MydoJob inJob2 = mydoJobMapper.selectInJobByTrayCode(trayCode);
return AjaxResult.success(JSONUtil.toJsonStr(inJob2));
}
}
}else{
return AjaxResult.error("该条码无入库任务,请扫码绑定!");
}
@@ -197,9 +199,20 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.error("任务不存在");
}
MydoJob outJob = outMydoJobs.get(0);
//出库作业
outJob.setExecutionPhase("2");
mydoJobService.updateMydoJob(outJob);
break;
case "7":
//移库作业
mydoJobParam.setTaskNo(wmsJobRequest.getTaskNo());
List<MydoJob> ykMydoJobs = mydoJobService.selectMydoJobListApi(mydoJobParam);
if (ykMydoJobs.isEmpty()) {
return AjaxResult.error("任务不存在");
}
MydoJob ykJob = ykMydoJobs.get(0);
mydoJobService.ykCompleted(ykJob);
break;
default:
log.error("作业类型错误");
@@ -385,5 +398,32 @@ public class ToWmsServiceImpl implements IToWmsService {
return AjaxResult.error(erpProduct.getSys_MainId()+"物料不存在");
}
@Override
public AjaxResult requestEnterByTaskNo(RequestEnter requestEnter) {
String taskNo = requestEnter.getTaskNo();
String deviceCode = requestEnter.getDeviceCode();
MydoJob inJob = mydoJobMapper.selectInJobByTaskNo(taskNo);
if(inJob != null && Integer.parseInt(inJob.getInOrOut()) < 20){
if(inJob.getCargoSpaceId() != null && !"".equals(inJob.getCargoSpaceId())){
return AjaxResult.success(inJob);
}else{
//分配货位
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", inJob.getTrayCode());
map.put("v_code", deviceCode);
mydoJobMapper.allotInJobSpace(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
MydoJob inJob2 = mydoJobMapper.selectInJobByTaskNo(taskNo);
return AjaxResult.success(inJob2);
}
}
}else{
return AjaxResult.error("该条码无入库任务,请扫码绑定!");
}
}
}

View File

@@ -5,6 +5,10 @@ import com.ruoyi.bas.cargoSpace.domain.BasCargoSpace;
import com.ruoyi.bas.cargoSpace.service.IBasCargoSpaceService;
import com.ruoyi.in.stockinfinish.domain.InStockinFinish;
import com.ruoyi.in.stockinfinish.service.IInStockinFinishService;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.job.mydojob.service.IMydoJobService;
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
import com.ruoyi.out.outStockoutFinish.domain.OutStockoutFinish;
import com.ruoyi.out.outStockoutFinish.service.IOutStockoutFinishService;
import com.ruoyi.stock.stock.domain.BasStock;
@@ -33,6 +37,10 @@ public class TwinServiceImpl implements ITwinService {
private IInStockinFinishService inStockinFinishService;
@Autowired
private IOutStockoutFinishService outStockoutFinishService;
@Autowired
private IMydoJobService mydoJobService;
@Autowired
private IMydoJobDetailService mydoJobDetailService;
@Override
public Map<String, Object> getStockListOverview() {
@@ -250,4 +258,62 @@ public class TwinServiceImpl implements ITwinService {
result.put("monthOutStock", monthOutStock);
return result;
}
@Override
public Map<String, Object> getCargo(String cargoSpaceName) {
BasStock basStock = new BasStock();
basStock.setCargoSpaceId(cargoSpaceName);
List<BasStock> list = basStockService.selectBasStockList(basStock);
List<Map<String, String>> dataList = new ArrayList<>();
for (BasStock stock : list) {
Map<String, String> dataMap = new HashMap<>();
dataMap.put("productId", stock.getProductId());
dataMap.put("productName", stock.getProductName());
dataMap.put("quantity", stock.getQuantity());
dataMap.put("trayCode", stock.getTrayCode());
dataList.add(dataMap);
}
Map<String, Object> result = new HashMap<>();
result.put("data", dataList);
return result;
}
@Override
public Map<String, Object> getTaskCargo(String taskNo) {
MydoJob mydoJob = new MydoJob();
mydoJob.setTaskNo(taskNo);
List<MydoJob> jobList = mydoJobService.selectMydoJobList(mydoJob);
List<Map<String, String>> dataList = new ArrayList<>();
if (jobList != null && !jobList.isEmpty()) {
MydoJob job = jobList.get(0);
String jobId = job.getJobId();
String inOrOutStr = job.getInOrOut();
int inOrOut = 0;
try {
inOrOut = Integer.parseInt(inOrOutStr);
} catch (Exception e) {
// Ignore parse error
}
List<MydoJobDetail> details = mydoJobDetailService.selectMydoJobDetailListByJobId(jobId);
for (MydoJobDetail detail : details) {
Map<String, String> dataMap = new HashMap<>();
dataMap.put("productId", detail.getProductId());
dataMap.put("productName", detail.getProductName());
String quantity = "0";
if (inOrOut < 20) {
quantity = detail.getInQuantity();
} else {
quantity = detail.getOutQuantity();
}
dataMap.put("quantity", quantity);
dataMap.put("trayCode", detail.getTrayCode());
dataList.add(dataMap);
}
}
Map<String, Object> result = new HashMap<>();
result.put("data", dataList);
return result;
}
}

View File

@@ -71,6 +71,7 @@ public class BasTraycodeController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody BasTraycode basTraycode)
{
return toAjax(basTraycodeService.insertBasTraycode(basTraycode));
}

View File

@@ -16,16 +16,16 @@ public class BasTraycode extends BaseEntity
private static final long serialVersionUID = 1L;
/** id */
@Excel(name = "${bas.Traycode.id}")
// @Excel(name = "${bas.Traycode.id}")
private Long id;
/** 条码类型id */
@Excel(name = "${bas.Traycode.formatId}")
// @Excel(name = "${bas.Traycode.formatId}")
private Long formatId;
private String formatName;
/** 条码 */
@Excel(name = "${bas.Traycode.trayCode}")
@Excel(name = "条码")
private String trayCode;
/** 备用字段1 */
@@ -33,7 +33,7 @@ public class BasTraycode extends BaseEntity
private String spare1;
/** 备用字段2 */
// @Excel(name = "${bas.Traycode.spare2}")
@Excel(name = "是否可用",dictType = "sys_yes_no")
private String spare2;
/** 备用字段3 */

View File

@@ -61,4 +61,6 @@ public interface BasTraycodeMapper
public int deleteBasTraycodeByIds(Long[] ids);
void insertBasTraycodeList(List<BasTraycode> list);
Integer selectBasTrayCodeMax();
}

View File

@@ -61,4 +61,6 @@ public interface IBasTraycodeService
public int deleteBasTraycodeById(Long id);
void insertBasTraycodeList(List<BasTraycode> traycodeList);
Integer selectBasTrayCodeMax();
}

View File

@@ -1,9 +1,12 @@
package com.ruoyi.bas.traycode.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.ruoyi.bas.traycode.domain.BasTraycode;
import com.ruoyi.bas.traycode.mapper.BasTraycodeMapper;
import com.ruoyi.bas.traycode.service.IBasTraycodeService;
import com.ruoyi.bas.traycodeformat.domain.BasTraycodeFormat;
import com.ruoyi.bas.traycodeformat.service.IBasTraycodeFormatService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -21,6 +24,8 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
{
@Autowired
private BasTraycodeMapper basTraycodeMapper;
@Autowired
private IBasTraycodeFormatService basTraycodeFormatService;
/**
* 查询条码信息
@@ -55,8 +60,33 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
@Override
public int insertBasTraycode(BasTraycode basTraycode)
{
basTraycode.setCreateTime(DateUtils.getNowDate());
return basTraycodeMapper.insertBasTraycode(basTraycode);
try {
BasTraycodeFormat basTraycodeFormat = basTraycodeFormatService.selectBasTraycodeFormatById(basTraycode.getFormatId());
int i1 = Integer.parseInt(basTraycode.getSpare1());
//如果i<4位数,前面补0
String code = "";
for (int j = 0; j < i1; j++) {
code = String.format("%07d",Convert.toInt( basTraycodeFormat.getSerialRule()) + 1 + j);
if(basTraycodeFormat.getMaxNum() < Convert.toLong( code)){
throw new RuntimeException("已生成最大值");
}
String finalCode = basTraycodeFormat.getBarcodeFormat()+code;
basTraycode.setTrayCode(finalCode);
basTraycode.setSpare1(null);
basTraycode.setCreateTime(DateUtils.getNowDate());
basTraycode.setSpare2("Y");
basTraycodeMapper.insertBasTraycode(basTraycode);
}
basTraycodeFormat.setSerialRule(Convert.toLong( code).toString());
basTraycodeFormatService.updateBasTraycodeFormat(basTraycodeFormat);
} catch (Exception e) {
throw new RuntimeException(e);
}
return 1;
}
/**
@@ -103,4 +133,9 @@ public class BasTraycodeServiceImpl implements IBasTraycodeService
basTraycodeMapper.insertBasTraycodeList(list);
}
}
@Override
public Integer selectBasTrayCodeMax() {
return basTraycodeMapper.selectBasTrayCodeMax();
}
}

View File

@@ -1,17 +1,13 @@
package com.ruoyi.bas.traycodeformat.service.impl;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.bas.traycode.domain.BasTraycode;
import com.ruoyi.bas.traycode.service.IBasTraycodeService;
import com.ruoyi.bas.traycodeformat.domain.BasTraycodeFormat;
import com.ruoyi.bas.traycodeformat.mapper.BasTraycodeFormatMapper;
import com.ruoyi.bas.traycodeformat.service.IBasTraycodeFormatService;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
@@ -79,20 +75,7 @@ public class BasTraycodeFormatServiceImpl implements IBasTraycodeFormatService
public int updateBasTraycodeFormat(BasTraycodeFormat basTraycodeFormat)
{
BasTraycodeFormat old = selectBasTraycodeFormatById(basTraycodeFormat.getId());
int oldSerialRule = Convert.toInt(old.getSerialRule());
int newSerialRule = Convert.toInt(basTraycodeFormat.getSerialRule());
List<BasTraycode> traycodeList = new ArrayList<>();
for (int i = oldSerialRule; i < newSerialRule; i++) {
BasTraycode basTraycode = new BasTraycode();
basTraycode.setFormatId(basTraycodeFormat.getId());
String traycode = old.getBarcodeFormat()+ StrUtil.padPre(Convert.toStr(i),5,'0');
basTraycode.setTrayCode(traycode);
traycodeList.add(basTraycode);
}
basTraycodeFormat.setUpdateTime(DateUtils.getNowDate());
//插入条码信息
basTraycodeService.insertBasTraycodeList(traycodeList);
return basTraycodeFormatMapper.updateBasTraycodeFormat(basTraycodeFormat);
}

View File

@@ -182,8 +182,8 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
CheckStockinDetail checkStockinDetail = detailList.get(i);
checkStockinDetail.setStockCheckDetailId(stockCheckId + "-" + (i + 1));
checkStockinDetail.setStockCheckId(stockCheckId);
BasProduct basProduct = productService.selectBasProductByProductId(checkStockinDetail.getProductId());
checkStockinDetail.setProductGuid(basProduct.getProductGuid());
// BasProduct basProduct = productService.selectBasProductByProductId(checkStockinDetail.getProductId());
// checkStockinDetail.setProductGuid(basProduct.getProductGuid());
checkStockinDetail.setStockCheckGuid(checkStockin.getStockGuid());
checkStockinDetail.setScanNum("0");
checkStockinDetail.setAssignNum("0");
@@ -229,7 +229,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService {
checkStockinMapper.autoAllot(map);
builder.append("行明细:" + checkStockinDetail.getStockCheckDetailId() + ",分配结果:" + map.get("v_resultmsg") + "<br />");
}
iToWcsService.pushOutMydoJob();
//iToWcsService.pushOutMydoJob();
return AjaxResult.success(builder.toString());

View File

@@ -60,4 +60,6 @@ public interface AgvContainerTaskMapper
public int deleteAgvContainerTaskByIds(Long[] ids);
void insertHistory(Long id);
void deleteAgvJobByOrder(String order);
}

View File

@@ -60,4 +60,6 @@ public interface IAgvContainerTaskService
public int deleteAgvContainerTaskById(Long id);
void insertHistory(Long id);
void deleteAgvJobByOrder(String order);
}

View File

@@ -97,4 +97,9 @@ public class AgvContainerTaskServiceImpl implements IAgvContainerTaskService
public void insertHistory(Long id) {
agvContainerTaskMapper.insertHistory(id);
}
@Override
public void deleteAgvJobByOrder(String order) {
agvContainerTaskMapper.deleteAgvJobByOrder(order);
}
}

View File

@@ -102,8 +102,54 @@ public class InStockin extends BaseEntity
private String lotNo;
private String materialDesc;
private String productId;
private String startDate;
private String companyShortName;
private String accountSetNo;
private String cargoNo;
private String stockinDetailId;
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getStockinDetailId() {
return stockinDetailId;
}
public void setStockinDetailId(String stockinDetailId) {
this.stockinDetailId = stockinDetailId;
}
public String getCargoNo() {
return cargoNo;
}
public void setCargoNo(String cargoNo) {
this.cargoNo = cargoNo;
}
public String getCompanyShortName() {
return companyShortName;
}
public void setCompanyShortName(String companyShortName) {
this.companyShortName = companyShortName;
}
public String getAccountSetNo() {
return accountSetNo;
}
public void setAccountSetNo(String accountSetNo) {
this.accountSetNo = accountSetNo;
}
private List<String> typeData;
public String getStartDate() {

View File

@@ -66,4 +66,6 @@ public interface InStockinMapper
void insertInStockinHistory(InStockin inStockin);
List<InStockin> selectStockinByDetail(String stockinDetailId);
List<InStockin> selectInStockinListBill(InStockin param);
}

View File

@@ -73,4 +73,6 @@ public interface IInStockinService
public int deleteInStockinByStockinGuid(String stockinGuid);
public List<InStockin> selectStockinByDetail(String stockinDetailId);
List<InStockin> selectInStockinListBill(InStockin param);
}

View File

@@ -255,4 +255,9 @@ public class InStockinServiceImpl implements IInStockinService
public List<InStockin> selectStockinByDetail(String stockinDetailId) {
return inStockinMapper.selectStockinByDetail(stockinDetailId);
}
@Override
public List<InStockin> selectInStockinListBill(InStockin param) {
return inStockinMapper.selectInStockinListBill(param);
}
}

View File

@@ -95,6 +95,24 @@ public class InStockinBack extends BaseEntity
private String sendTime;
private String msg;
private String companyShortName;
private String accountSetNo;
public String getCompanyShortName() {
return companyShortName;
}
public void setCompanyShortName(String companyShortName) {
this.companyShortName = companyShortName;
}
public String getAccountSetNo() {
return accountSetNo;
}
public void setAccountSetNo(String accountSetNo) {
this.accountSetNo = accountSetNo;
}
public String getSendStatus() {
return sendStatus;

View File

@@ -152,6 +152,44 @@ public class InStockinDetailBack extends BaseEntity
private String msg;
private String sourceLineId;
private String barCode;
private String isBatchManage;
private String oldProjectNo;
public String getSourceLineId() {
return sourceLineId;
}
public void setSourceLineId(String sourceLineId) {
this.sourceLineId = sourceLineId;
}
public String getBarCode() {
return barCode;
}
public void setBarCode(String barCode) {
this.barCode = barCode;
}
public String getIsBatchManage() {
return isBatchManage;
}
public void setIsBatchManage(String isBatchManage) {
this.isBatchManage = isBatchManage;
}
public String getOldProjectNo() {
return oldProjectNo;
}
public void setOldProjectNo(String oldProjectNo) {
this.oldProjectNo = oldProjectNo;
}
public String getSendStatus() {
return sendStatus;
}

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.ruoyi.in.stockin.domain.InStockin;
import com.ruoyi.in.stockindeatilback.domain.InStockinDetailBack;
import org.apache.ibatis.annotations.Param;
/**
* 入库单据子信息Mapper接口
@@ -61,4 +62,8 @@ public interface InStockinDetailBackMapper
* @return 结果
*/
public int deleteInStockinDetailBackByStockinDetailIds(String[] stockinDetailIds);
void insertInStockInDetailBackFinish(@Param("list") List<InStockinDetailBack> inStockinDetailParam);
void deleteInStockInDetailList(@Param("idList") List<InStockinDetailBack> inStockinDetails);
}

View File

@@ -58,4 +58,8 @@ public interface IInStockinDetailBackService
* @return 结果
*/
public int deleteInStockinDetailBackByStockinDetailId(String stockinDetailId);
void insertInStockInDetailBackFinish(List<InStockinDetailBack> inStockinDetails);
void deleteInStockInDetailList(List<InStockinDetailBack> inStockinDetails);
}

View File

@@ -90,4 +90,14 @@ public class InStockinDetailBackServiceImpl implements IInStockinDetailBackServi
{
return inStockinDetailBackMapper.deleteInStockinDetailBackByStockinDetailId(stockinDetailId);
}
@Override
public void insertInStockInDetailBackFinish(List<InStockinDetailBack> inStockinDetails) {
inStockinDetailBackMapper.insertInStockInDetailBackFinish(inStockinDetails);
}
@Override
public void deleteInStockInDetailList(List<InStockinDetailBack> inStockinDetails) {
inStockinDetailBackMapper.deleteInStockInDetailList(inStockinDetails);
}
}

View File

@@ -143,9 +143,13 @@ public class InStockinDetail extends BaseEntity
private String status;
private ExtraField extraField;
private String erpBill;
private String warehouseName;
private String warehouseId;
private String sourceLineId;
private String barCode;
private String isBatchManage;
private String oldProjectNo;
}

View File

@@ -69,4 +69,6 @@ public interface InStockinDetailMapper
void deleteInStockinDetailByStockinGuid(String stockinGuid);
InStockinDetail selectStockinByDetailById(InStockinDetail inStockinDetail);
List<InStockinDetail> selectStockInByDetailByBarCode(String barCode);
}

View File

@@ -81,4 +81,6 @@ public interface IInStockinDetailService
public InStockinDetail selectStockinByDetailById(InStockinDetail inStockinDetail);
List<InStockinDetail> selectStockInByDetailByBarCode(String barCode);
}

View File

@@ -127,4 +127,9 @@ public class InStockinDetailServiceImpl implements IInStockinDetailService
return inStockinDetailMapper.selectStockinByDetailById(inStockinDetail);
}
@Override
public List<InStockinDetail> selectStockInByDetailByBarCode(String barCode) {
return inStockinDetailMapper.selectStockInByDetailByBarCode(barCode);
}
}

View File

@@ -89,6 +89,15 @@ public class InStockinFinish extends BaseEntity
/** 备用字段5 */
@Excel(name = "备用字段5")
private String spare5;
private String stockinDetailId;
public String getStockinDetailId() {
return stockinDetailId;
}
public void setStockinDetailId(String stockinDetailId) {
this.stockinDetailId = stockinDetailId;
}
public void setStockinGuid(String stockinGuid)
{

View File

@@ -102,7 +102,7 @@ public class InStockinFinishServiceImpl implements IInStockinFinishService
}
@Override
@DataScope(warehouseAlias = "is2")
// @DataScope(warehouseAlias = "is2")
public List<InStockin> selectInStockinFinishListByInStockin(InStockin inStockin) {
return inStockinFinishMapper.selectInStockinFinishListByInStockin(inStockin);
}

View File

@@ -124,6 +124,9 @@ public class MydoJob extends BaseEntity
/** 重分标记 */
@Excel(name = "重分标记")
private String faultFlag;
private String endPoint;
private String inOut;
@@ -133,6 +136,23 @@ public class MydoJob extends BaseEntity
private String createRightTime;
private String productId;
private String stockinDetailId;
public String getEndPoint() {
return endPoint;
}
public void setEndPoint(String endPoint) {
this.endPoint = endPoint;
}
public String getStockinDetailId() {
return stockinDetailId;
}
public void setStockinDetailId(String stockinDetailId) {
this.stockinDetailId = stockinDetailId;
}
public String getProductId() {
return productId;

View File

@@ -82,5 +82,14 @@ public interface MydoJobMapper
MydoJob selectInJobByTrayCode(@Param("trayCode") String trayCode);
MydoJob selectInJobByTaskNo(@Param("taskNo") String taskNo);
void allotInJobSpace(HashMap<String, Object> map);
void ykCompleted(HashMap<String, Object> map);
void updateLed(HashMap<String, Object> map);
void updateLedError(HashMap<String, Object> map);
}

View File

@@ -109,4 +109,6 @@ public interface IMydoJobService
MydoJob selectMydoJobByEntranceId(MydoJob mydoJob);
List<MydoJob> getInJobBySerial(String serial);
void ykCompleted(MydoJob outJob);
}

View File

@@ -192,7 +192,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectMydoJobDetailList(param);
for (MydoJobDetail mydoJobDetail : mydoJobDetails) {
String inOrOutDId = mydoJobDetail.getInOrOutDId();
String inOrOutDId = mydoJobDetail.getStockinDetailId();
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inOrOutDId);
BigDecimal stockInNum = Convert.toBigDecimal(inStockinDetail.getScanNum());
BigDecimal jobInNum = Convert.toBigDecimal(mydoJobDetail.getInQuantity());
@@ -506,7 +506,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
msg = map.get("v_resultmsg").toString();
builder.append("托盘:" + basStock.getTrayCode() + ",分配结果:" + msg + "<br/>");
}
iToWcsService.pushOutMydoJob();
//iToWcsService.pushOutMydoJob();
if (!StrUtil.isEmpty(builder)) {
return AjaxResult.warn(builder.toString());
}
@@ -527,4 +527,17 @@ public class MydoJobServiceImpl implements IMydoJobService {
public List<MydoJob> getInJobBySerial(String trayCode) {
return mydoJobMapper.getInJobBySerial(trayCode);
}
@Override
public void ykCompleted(MydoJob outJob) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_job_id", outJob.getJobId());
map.put("v_result", null);
mydoJobMapper.ykCompleted(map);
if (!"10".equals(map.get("v_result").toString())) {
log.error("移库任务处理异常 异常代码{}", map.get("v_result"));
}else{
log.info("移库任务处理成功 jobId:[{}] trayCode:[{}]", outJob.getJobId(), outJob.getTrayCode());
}
}
}

View File

@@ -0,0 +1,27 @@
package com.ruoyi.job.mydojobdetail.domain;
import java.io.Serializable;
public class PkDetail implements Serializable {
private String stockinDetailId;
private String quantity;
public String getStockinDetailId() {
return stockinDetailId;
}
public void setStockinDetailId(String stockinDetailId) {
this.stockinDetailId = stockinDetailId;
}
public String getQuantity() {
return quantity;
}
public void setQuantity(String quantity) {
this.quantity = quantity;
}
}

View File

@@ -85,6 +85,34 @@ public class RequestLogController extends BaseController
return toAjax(requestLogService.updateRequestLog(requestLog));
}
@GetMapping("/getMethod")
public AjaxResult getMethod()
{
List<String> strings=requestLogService.getMethod();
return AjaxResult.success(requestLogService.getMethod());
}
// 获取原系统
@GetMapping("/getSource")
public AjaxResult getSource()
{
List<String> strings=requestLogService.getSource();
return AjaxResult.success(requestLogService.getSource());
}
// 获取目标系统
@GetMapping("/getTarget")
public AjaxResult getTarget()
{
List<String> strings=requestLogService.getTarget();
return AjaxResult.success(requestLogService.getTarget());
}
/**
* 删除接口记录
*/

View File

@@ -59,4 +59,10 @@ public interface RequestLogMapper
* @return 结果
*/
public int deleteRequestLogByRequestIds(Long[] requestIds);
List<String> getMethod();
List<String> getSource();
List<String> getTarget();
}

View File

@@ -69,6 +69,7 @@ public interface IRequestLogService
* @return
*/
public RequestLog getRequestLog(String url, String param, String remark,String source,String target);
public RequestLog getRequestLog(String url, String param, String remark,String source,String target,String billType,String ciccid);
/**
* 接收接口记录
*
@@ -77,4 +78,12 @@ public interface IRequestLogService
* @return
*/
public RequestLog getRequestLog(String param, String remark, AjaxResult ajaxResult);
public RequestLog getRequestLogERP(String param, String remark, AjaxResult ajaxResult);
List<String> getMethod();
List<String> getSource();
List<String> getTarget();
}

View File

@@ -3,6 +3,8 @@ package com.ruoyi.log.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.net.URLEncodeUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.common.core.domain.AjaxResult;
@@ -122,8 +124,10 @@ public class RequestLogServiceImpl implements IRequestLogService
requestLog.setRequestBody(param);
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtil.post(url, param);
// String resStr = HttpRequest.post(url).contentType("application/x-www-from-urlencoded").timeout(2000).body(param).execute().body();
String resStr = HttpUtil.post(url, param);
requestLog.setResponseBody(resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象");
@@ -133,7 +137,6 @@ public class RequestLogServiceImpl implements IRequestLogService
if (codeObj == null || !codeObj.toString().equals("200")) {
throw new RuntimeException("请求失败,状态码: " + (codeObj != null ? codeObj.toString() : "null"));
}
requestLog.setResponseBody(resStr);
requestLog.setResponseTime(DateUtil.formatDateTime(new Date()));
requestLog.setResponseStatus("1");
requestLog.setDuration(Convert.toStr(DateUtil.between(Convert.toDate(requestLog.getRequestTime()), Convert.toDate(requestLog.getResponseTime()), DateUnit.MS)));
@@ -148,6 +151,53 @@ public class RequestLogServiceImpl implements IRequestLogService
return requestLog;
}
@Override
public RequestLog getRequestLog(String url, String param, String remark, String source, String target, String billType, String ciccid) {
String body = "datajson=" + param
+ "&ibilltype=" + URLEncodeUtil.encodeAll(billType)
+ "&cacc_id=" + URLEncodeUtil.encodeAll(ciccid);
RequestLog requestLog = new RequestLog();
requestLog.setRequestTime(DateUtil.formatDateTime(new Date()));
requestLog.setSourceSystem(source);
requestLog.setTargetSystem(target);
requestLog.setEndpoint(remark);
requestLog.setRequestMethod("post");
requestLog.setRequestHeaders(null);
requestLog.setRequestBody(body);
requestLog.setRequestUrl(url);
try {
String resStr = HttpRequest.post(url)
.contentType("application/x-www-form-urlencoded;charset=UTF-8")
.body(body)
.execute().body();
requestLog.setResponseBody(resStr);
// 判断resStr的状态码,如果不是200抛出异常让catch捕获
if (!JSONUtil.isJsonObj(resStr)) {
throw new RuntimeException("返回结果不是有效的JSON对象");
}
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(resStr);
Object codeObj = jsonObject.get("ErrCode");
if (codeObj == null || !codeObj.toString().equals("0")) {
throw new RuntimeException("请求失败,状态码: " + (codeObj != null ? codeObj.toString() : "null"));
}
requestLog.setResponseTime(DateUtil.formatDateTime(new Date()));
requestLog.setResponseStatus("1");
requestLog.setDuration(Convert.toStr(DateUtil.between(Convert.toDate(requestLog.getRequestTime()), Convert.toDate(requestLog.getResponseTime()), DateUnit.MS)));
requestLog.setIsSuccessful("1");
} catch (Exception e) {
requestLog.setErrorDetails(e.getMessage());
requestLog.setIsSuccessful("0");
requestLog.setResponseStatus("0");
} finally {
insertRequestLog(requestLog);
}
return requestLog;
}
/**
* 插入请求日志
*
@@ -173,4 +223,46 @@ public class RequestLogServiceImpl implements IRequestLogService
requestLog.setResponseBody(Convert.toStr(ajaxResult.get("msg")));
return requestLog;
}
@Override
public RequestLog getRequestLogERP(String param, String remark, AjaxResult ajaxResult) {
RequestLog requestLog = new RequestLog();
requestLog.setRequestTime(DateUtil.formatDateTime(new Date()));
requestLog.setRequestBody(param);
requestLog.setSourceSystem("erp");
requestLog.setTargetSystem("wms");
requestLog.setEndpoint(remark);
requestLog.setRequestMethod("post");
requestLog.setResponseTime(DateUtil.formatDateTime(new Date()));
requestLog.setDuration(Convert.toStr(DateUtil.between(Convert.toDate(requestLog.getRequestTime()), Convert.toDate(requestLog.getResponseTime()), DateUnit.MS)));
requestLog.setResponseStatus("1");
if (ajaxResult.isSuccess()){
requestLog.setIsSuccessful("1");
}else {
requestLog.setIsSuccessful("0");
}
requestLog.setResponseBody(Convert.toStr(ajaxResult.get("msg")));
return requestLog;
}
@Override
public List<String> getMethod() {
return requestLogMapper.getMethod();
}
@Override
public List<String> getSource() {
return requestLogMapper.getSource();
}
@Override
public List<String> getTarget() {
return requestLogMapper.getTarget();
}
public static void main(String[] args) {
String aa = "{\"code\":\"200,\"success\":true,\"msg\":\"请求成功\"}";
System.out.println(JSONUtil.isJsonObj(aa));
}
}

View File

@@ -42,6 +42,9 @@ public class ViewHandAllotStockController extends BaseController
public TableDataInfo list(ViewHandAllotStock viewHandAllotStock)
{
startPage();
if (viewHandAllotStock.getWarehouseCode()==null||viewHandAllotStock.getWarehouseCode().equals("")){
viewHandAllotStock.setWarehouseCode("1");
}
List<ViewHandAllotStock> list = viewHandAllotStockService.selectViewHandAllotStockList(viewHandAllotStock);
return getDataTable(list);
}

View File

@@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.data.annotation.Transient;
/**
* 手动分配库存对象 view_hand_allot_stock
@@ -187,7 +188,38 @@ public class ViewHandAllotStock extends BaseEntity
@Excel(name = "货位锁")
private String locked;
public void setStockId(String stockId)
@Transient
private String ktpType;
@Transient
private String productType;
@Transient
private String warehouseCode;
public String getWarehouseCode() {
return warehouseCode;
}
public void setWarehouseCode(String warehouseCode) {
this.warehouseCode = warehouseCode;
}
public String getKtpType() {
return ktpType;
}
public void setKtpType(String ktpType) {
this.ktpType = ktpType;
}
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
public void setStockId(String stockId)
{
this.stockId = stockId;
}

View File

@@ -35,7 +35,7 @@ public class OutStockoutController extends BaseController {
/**
* 查询出库主单列表
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:list')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:list')")
@GetMapping("/list")
public TableDataInfo list(OutStockout outStockout) {
startPage();
@@ -51,7 +51,7 @@ public class OutStockoutController extends BaseController {
/**
* 导出出库主单列表
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:export')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:export')")
@Log(title = "出库主单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, OutStockout outStockout) {
@@ -63,7 +63,7 @@ public class OutStockoutController extends BaseController {
/**
* 获取出库主单详细信息
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:query')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:query')")
@GetMapping(value = "/{stockoutGuid}")
public AjaxResult getInfo(@PathVariable("stockoutGuid") String stockoutGuid) {
return success(outStockoutService.selectOutStockoutByStockoutGuid(stockoutGuid));
@@ -72,7 +72,7 @@ public class OutStockoutController extends BaseController {
/**
* 新增出库主单
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:add')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:add')")
@Log(title = "出库主单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody OutStockout outStockout) {
@@ -82,7 +82,7 @@ public class OutStockoutController extends BaseController {
/**
* 修改出库主单
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:edit')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:edit')")
@Log(title = "出库主单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody OutStockout outStockout) {
@@ -92,7 +92,7 @@ public class OutStockoutController extends BaseController {
/**
* 删除出库主单
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:remove')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:remove')")
@Log(title = "出库主单", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockoutGuids}")
public AjaxResult remove(@PathVariable String[] stockoutGuids) {
@@ -107,7 +107,7 @@ public class OutStockoutController extends BaseController {
*/
@Log(title = "出库主单保存", businessType = BusinessType.OTHER)
@PostMapping("/saveBill")
@PreAuthorize("@ss.hasPermi('out:outStockout:saveBill')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:saveBill')")
@ResponseBody
public AjaxResult saveBill(@RequestBody OutStockoutVo outStockoutVo) {
String stockOutId = outStockoutService.saveBill(outStockoutVo);
@@ -117,7 +117,7 @@ public class OutStockoutController extends BaseController {
/**
* 出库单据状态改变
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:changeStatus')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:changeStatus')")
@Log(title = "出库主单状态改变", businessType = BusinessType.OTHER)
@RequestMapping("/changeStatus")
@ResponseBody
@@ -132,17 +132,24 @@ public class OutStockoutController extends BaseController {
* @param stockoutId
* @return
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:autoAllot')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:autoAllot')")
@Log(title = "出库单自动分配", businessType = BusinessType.OTHER)
@GetMapping("/autoAllot")
public AjaxResult autoAllot(@RequestParam("stockoutId") String stockoutId) {
// 修改出库方向
// OutStockout outStockout = new OutStockout();
// outStockout.setStockoutId(stockoutId);
// outStockout.setSpare8(spare8);
// outStockoutService.updateOutStockout(outStockout);
System.out.println(stockoutId);
// System.out.println(spare8);
return outStockoutService.autoAllot(stockoutId);
}
/**
* 手动分配
*/
@PreAuthorize("@ss.hasPermi('out:outStockout:manualAllot')")
// @PreAuthorize("@ss.hasPermi('out:outStockout:manualAllot')")
@Log(title = "出库单手动分配", businessType = BusinessType.OTHER)
@GetMapping("/manualAllot")
public AjaxResult manualAllot(@RequestParam("stockList") String[] stockList, @RequestParam("stockoutDetailId") String stockoutDetailId) {

View File

@@ -91,6 +91,9 @@ public class OutStockout extends BaseEntity
private String spare4;
private String spare5;
private String spare6;
private String spare7;
private String spare8;
private String customerName;
@@ -99,9 +102,51 @@ public class OutStockout extends BaseEntity
private String productId;
private String productName;
private String companyShortName;
private String accountSetNo;
public String getCompanyShortName() {
return companyShortName;
}
public void setCompanyShortName(String companyShortName) {
this.companyShortName = companyShortName;
}
public String getAccountSetNo() {
return accountSetNo;
}
public void setAccountSetNo(String accountSetNo) {
this.accountSetNo = accountSetNo;
}
private List<String> typeData;
public String getSpare6() {
return spare6;
}
public void setSpare6(String spare6) {
this.spare6 = spare6;
}
public String getSpare7() {
return spare7;
}
public void setSpare7(String spare7) {
this.spare7 = spare7;
}
public String getSpare8() {
return spare8;
}
public void setSpare8(String spare8) {
this.spare8 = spare8;
}
public List<String> getTypeData() {
return typeData;
}

View File

@@ -68,4 +68,6 @@ public interface OutStockoutMapper
OutStockout selectOutStockoutByStockoutId(String stockoutId);
void manualAllot(HashMap<String, String> map);
void updateOutStockouts(OutStockout mainOut);
}

View File

@@ -73,4 +73,6 @@ public interface IOutStockoutService
List<OutStockout> selectOutStockoutListApi(OutStockout outStockoutParam);
AjaxResult manualAllot(String[] stockList,String stockoutDetailId);
void updateOutStockouts(OutStockout mainOut);
}

View File

@@ -180,10 +180,11 @@ public class OutStockoutServiceImpl implements IOutStockoutService
for (OutStockoutDetail detail : outStockoutDetails) {
if (detail.getAllotQuantity().compareTo(detail.getQuantity()) < 0){
map.put("v_stockout_detail_id", detail.getStockoutDetailId());
map.put("v_result", null);
map.put("v_resultmsg", null);
outStockoutMapper.autoAllot(map);
toWcsService.pushOutMydoJob();
if (!"10".equals(map.get("v_result"))){
stringBuilder.append(",").append(detail.getStockoutDetailId()+map.get("v_resultString"));
stringBuilder.append(",").append(detail.getStockoutDetailId()+map.get("v_resultmsg"));
}
}else{
stringBuilder.append(",").append(detail.getStockoutDetailId()+"单据已分配完成");
@@ -209,7 +210,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService
map.put("v_stockout_detail_id", stockoutDetailId);
map.put("v_stock_id", stock);
outStockoutMapper.manualAllot(map);
toWcsService.pushOutMydoJob();
//toWcsService.pushOutMydoJob();
if (!"10".equals(map.get("v_result"))){
stringBuilder.append(",").append(stockoutDetailId+map.get("v_resultString"));
}
@@ -219,4 +220,9 @@ public class OutStockoutServiceImpl implements IOutStockoutService
}
return AjaxResult.success();
}
@Override
public void updateOutStockouts(OutStockout mainOut) {
outStockoutMapper.updateOutStockouts(mainOut);
}
}

View File

@@ -48,7 +48,7 @@ public class OutStockoutDetail extends BaseEntity
/** 计划数量(箱) */
@Excel(name = "计划数量", readConverterExp = "箱=")
private BigDecimal quantityX;
private String quantityX;
/** 计划数量(件) */
@Excel(name = "计划数量", readConverterExp = "件=")
@@ -200,6 +200,42 @@ public class OutStockoutDetail extends BaseEntity
private String spare9;
private String sourceLineId;
private String barCode;
private String isBatchManage;
private String oldProjectNo;
public String getSourceLineId() {
return sourceLineId;
}
public void setSourceLineId(String sourceLineId) {
this.sourceLineId = sourceLineId;
}
public String getBarCode() {
return barCode;
}
public void setBarCode(String barCode) {
this.barCode = barCode;
}
public String getIsBatchManage() {
return isBatchManage;
}
public void setIsBatchManage(String isBatchManage) {
this.isBatchManage = isBatchManage;
}
public String getOldProjectNo() {
return oldProjectNo;
}
public void setOldProjectNo(String oldProjectNo) {
this.oldProjectNo = oldProjectNo;
}
public String getSpare1() {
return spare1;
@@ -407,14 +443,12 @@ public class OutStockoutDetail extends BaseEntity
return quantity;
}
public void setQuantityX(BigDecimal quantityX)
{
this.quantityX = quantityX;
public String getQuantityX() {
return quantityX;
}
public BigDecimal getQuantityX()
{
return quantityX;
public void setQuantityX(String quantityX) {
this.quantityX = quantityX;
}
public void setQuantityJ(BigDecimal quantityJ)

View File

@@ -35,7 +35,7 @@ public class ViewProductAndStockController extends BaseController
private IViewProductAndStockService viewProductAndStockService;
/**
* 查询库存物资列表
// * 查询库存物资列表
*/
@PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:list')")
@GetMapping("/list")

View File

@@ -2,26 +2,42 @@ package com.ruoyi.pda.controller;
import com.ruoyi.api.domain.RequestEnter;
import com.ruoyi.api.domain.WcsPort;
import com.ruoyi.bas.agvPoint.domain.AgvPoint;
import com.ruoyi.bas.agvPoint.domain.AgvTask;
import com.ruoyi.bas.agvPoint.service.impl.AgvPointServiceImpl;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.device.agv.domain.AgvContainerTask;
import com.ruoyi.device.agv.service.IAgvContainerTaskService;
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.job.mydojob.service.IMydoJobService;
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.out.outStockout.domain.OutStockout;
import com.ruoyi.out.outStockout.service.impl.OutStockoutServiceImpl;
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
import com.ruoyi.out.outStockoutDetail.service.impl.OutStockoutDetailServiceImpl;
import com.ruoyi.pda.domain.TrayCodeMakeSure;
import com.ruoyi.pda.domain.TrayCodeMsg;
import com.ruoyi.pda.mapper.PdaMapper;
import com.ruoyi.pda.service.PdaService;
import com.ruoyi.stock.stock.domain.BasStock;
import com.ruoyi.stock.stock.service.IBasStockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
@Controller
@RequestMapping("/pda")
@@ -32,6 +48,20 @@ public class PdaController extends BaseController {
private PdaService pdaService;
@Autowired
private IInStockinDetailService iInStockinDetailService;
@Autowired
private OutStockoutServiceImpl outStockoutService;
@Autowired
private OutStockoutDetailServiceImpl outStockoutDetailService;
@Autowired
private AgvPointServiceImpl agvPointService;
@Autowired
private IAgvContainerTaskService agvContainerTaskService;
@Autowired
private PdaMapper pdaMapper;
@Autowired
private IMydoJobService mydoJobService;
@Autowired
private IBasStockService basStockService;
/**
* 查询是否有半满托盘
@@ -46,11 +76,11 @@ public class PdaController extends BaseController {
/**
* 通过单据码查询物料详情
*/
@RequestMapping("/selectDetailById")
@RequestMapping("/selectDetailByIds")
@ResponseBody
public AjaxResult selectDetailById(String inStockinDetailId) {
public AjaxResult selectDetailByIds(String inStockinDetailId) {
InStockinDetail inStockinDetail = iInStockinDetailService.selectInStockinDetailByStockinDetailId(inStockinDetailId);
if(inStockinDetail != null) {
if (inStockinDetail != null) {
inStockinDetail.setQuantity(String.valueOf(Integer.valueOf(inStockinDetail.getQuantity()) - Integer.valueOf(inStockinDetail.getScanNum())));
}
return AjaxResult.success(inStockinDetail);
@@ -67,6 +97,22 @@ public class PdaController extends BaseController {
}
/**
* 通过单据码查询物料详情 TODO 修改单据码为barCode 前端需同步修改
*/
@RequestMapping("/selectDetailById")
@ResponseBody
public AjaxResult selectDetailById(String barCode) {
List<InStockinDetail> stockinDetails = iInStockinDetailService.selectStockInByDetailByBarCode(barCode);
stockinDetails.stream().forEach(inStockinDetail -> {
Integer quantity = StringUtils.hasText(inStockinDetail.getQuantity()) ? Integer.valueOf(inStockinDetail.getQuantity()) : 0;
Integer scanNum = StringUtils.hasText(inStockinDetail.getScanNum()) ? Integer.valueOf(inStockinDetail.getScanNum()) : 0;
inStockinDetail.setQuantity(String.valueOf(quantity - scanNum));
});
return AjaxResult.success(stockinDetails);
}
/**
* 通过托盘码查询作业或trayMsg
*/
@@ -85,13 +131,20 @@ public class PdaController extends BaseController {
return pdaService.bindTray(trayCodeMakeSure);
}
@RequestMapping("/bindTray2")
@ResponseBody
public AjaxResult bindTray2(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
return pdaService.bindTray2(trayCodeMakeSure);
}
/**
* 空托盘入库
*/
@RequestMapping("/tpIn")
@ResponseBody
public AjaxResult tpIn(@RequestBody TrayCodeMsg trayCodeMsg) {
return pdaService.tpIn(trayCodeMsg.getTrayCode());
return pdaService.tpIn(trayCodeMsg);
}
/**
@@ -105,12 +158,13 @@ public class PdaController extends BaseController {
/**
* 出库确认查询子作业信息
*
* @param trayCodeMsg
* @return
*/
@RequestMapping("/selectJobDetailByTray")
@ResponseBody
public AjaxResult selectJobDetailByTray(@RequestBody TrayCodeMsg trayCodeMsg){
public AjaxResult selectJobDetailByTray(@RequestBody TrayCodeMsg trayCodeMsg) {
return pdaService.selectJobDetailByTray(trayCodeMsg);
}
@@ -129,9 +183,6 @@ public class PdaController extends BaseController {
}
/**
* 入库扫码生成作业
*/
@@ -142,7 +193,6 @@ public class PdaController extends BaseController {
}
@RequestMapping("/selectDetailByPDTray")
@ResponseBody
public AjaxResult selectDetailByPDTray(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
@@ -150,9 +200,6 @@ public class PdaController extends BaseController {
}
/**
* 盘点出库确认
*
@@ -161,7 +208,7 @@ public class PdaController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('pda:check:checkMakeSure')")
@PostMapping("/checkMakeSure")
@Log(title = "手持机盘点出库确认", businessType = BusinessType.INSERT)
@Log(title = "手持机盘点出库确认", businessType = BusinessType.OTHER)
@ResponseBody
public AjaxResult checkMakeSure(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
return pdaService.checkMakeSure(trayCodeMakeSure);
@@ -179,6 +226,245 @@ public class PdaController extends BaseController {
return pdaService.updateWcsPort(wcsPort);
}
@RequestMapping("/hcoutMakesure")
@ResponseBody
@Log(title = "手持机缓存出库确认", businessType = BusinessType.OTHER)
public AjaxResult hcoutMakesure(String trayCode) {
return pdaService.hcoutMakesure(trayCode);
}
/**
* 平库入库
*/
@RequestMapping("/inStockPk")
@ResponseBody
public AjaxResult inStockPk(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
return pdaService.completeInPk(trayCodeMakeSure);
}
/**
* 库存查询(平库扫码查询托盘入库信息)
*/
@RequestMapping("/searchStock")
@ResponseBody
public AjaxResult searchStock(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
return pdaService.selectBasStockHc(trayCodeMakeSure.getTrayCode());
}
/**
* 立库出库信息校验
*
* @param trayCodeMakeSure
* @return
*/
@RequestMapping("/verifyMaterial")
@ResponseBody
public AjaxResult verifyMaterial(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
String trayCode = trayCodeMakeSure.getTrayCode();
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
for (MydoJobDetail m : mydoJobDetailList) {
Integer count = pdaService.selectByTrayCodeAndProduct(trayCode, m.getProductId());
if (count == 0) {
return AjaxResult.error(m.getProductId() + ",物料不是出库物料");
}
}
return AjaxResult.success();
}
/**
* 平库出库确认
*
* @param trayCodeMakeSure
* @return
*/
@RequestMapping("/completeOutPk")
@ResponseBody
@Async
@Transactional(rollbackFor = Exception.class)
public AjaxResult completeOutPk(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
try {
String trayCode = trayCodeMakeSure.getTrayCode();
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
for (MydoJobDetail m : mydoJobDetailList) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCode);
map.put("v_out_stockout_detail_id", trayCodeMakeSure.getStockoutDetailId());
map.put("v_quantity", m.getOutQuantity());
map.put("v_stock_id", m.getStockId());
pdaService.completeOutPk(map);
Integer vResult = (Integer) map.get("v_result");
if (vResult != 10) {
System.err.println(map.get("v_result_msg").toString());
return AjaxResult.error(map.get("v_result_msg").toString());
}
}
return AjaxResult.success();
} catch (Exception e) {
throw new RuntimeException(e.getMessage());
}
}
/**
* 查询平库出库主单 建议参数(erpStockOutId U8单据号作为查询条件传到后台)
*
* @param outStockout
* @return
*/
@RequestMapping("/OutFillPk")
@ResponseBody
public AjaxResult OutFillPk() {
OutStockout outStockout = new OutStockout();
outStockout.setWarehouseId("2");
outStockoutService.selectOutStockoutList(outStockout);
return AjaxResult.success(outStockoutService.selectOutStockoutList(outStockout));
}
/**
* 查出平库出库子单 参数: stockoutId 作为参数传递到后台
*
* @param outStockout
* @return
*/
@RequestMapping("/OutFillPkDetail")
@ResponseBody
public AjaxResult OutFillPkDetail(@RequestBody OutStockout outStockout) {
List<OutStockout> outStockouts = outStockoutService.selectOutStockoutList(outStockout);
return AjaxResult.success(outStockoutDetailService.selectOutStockoutDetailByStockoutGuid(outStockouts.get(0).getStockoutGuid()));
}
/**
* 查询平库出库子单对应信息 在平库中是否存在
* 参数:trayCode 托盘码
* 参数:stockinDetailId 子单据号
*
* @param trayCodeMsg
* @return
*/
@RequestMapping("/queryBasStockHc")
@ResponseBody
public AjaxResult queryBasStockHc(@RequestBody TrayCodeMsg trayCodeMsg) {
return pdaService.selectBasStockHcs(trayCodeMsg.getTrayCode(), trayCodeMsg.getStockoutDetailId());
}
// 立库扫码规则校验
@RequestMapping("/validateMaterial")
@ResponseBody
public AjaxResult validateMaterial(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_stockin_detail_id", trayCodeMakeSure.getInStockinDetailId());
map.put("v_is_bound_accord", trayCodeMakeSure.getIsBoundByAccord());
map.put("v_quantity", trayCodeMakeSure.getQuantity());
pdaMapper.bindTray(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_result").toString());
} else {
return AjaxResult.success(map.get("v_result").toString());
}
}
/**
* 平库出库信息校验
*
* @param trayCodeMakeSure TODO 要校验项目号,批号,以及其他条件,要复合查询,待修改
* @return
*/
@RequestMapping("/verifypkTrayMaterials")
@ResponseBody
public AjaxResult verifypkTrayMaterials(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
String trayCode = trayCodeMakeSure.getTrayCode();
List<MydoJobDetail> mydoJobDetailList = trayCodeMakeSure.getMydoJobDetailList();
for (MydoJobDetail m : mydoJobDetailList) {
String productId = m.getProductId();
Integer integer = pdaService.selectBasStockHcCount(trayCode, productId);
if (integer == 0) {
return AjaxResult.error(m.getProductId() + ",物料不是出库物料");
}
}
return AjaxResult.success();
}
// 查询AGV的起点和终点
@RequestMapping("/selectAgvPointByType")
@ResponseBody
public AjaxResult selectAgvPointByType(String type) {
AgvPoint agvPoint = new AgvPoint();
agvPoint.setType(type);
List<AgvPoint> agvPoints = agvPointService.selectAgvPointList(agvPoint);
return AjaxResult.success(agvPoints);
}
// 保存agv执行队列
@RequestMapping("/insertAgvJob")
@ResponseBody
public AjaxResult insertAgvJob(@RequestBody AgvTask agvTask) {
AgvPoint agvPoint = new AgvPoint();
agvPoint.setStation(agvTask.getEndPoint());
List<AgvPoint> agvPoints = agvPointService.selectAgvPointList(agvPoint);
if (!agvPoints.get(0).getStation().equals("K1-1") && !agvPoints.get(0).getStation().equals("K2-1") && agvPoints.get(0).getSpare1().equals("2")) {
return AjaxResult.error("该点位被占用,请检查!");
}
AgvContainerTask agvContainerTask = new AgvContainerTask();
agvContainerTask.setContainer(UUID.randomUUID().toString());
agvContainerTask.setEndPoint(agvTask.getEndPoint());
agvContainerTask.setStartPoint(agvTask.getStartPoint());
agvContainerTask.setSpare1(agvTask.getType());
agvContainerTask.setSpare2(agvTask.getTrayCode());
agvContainerTask.setStatus("0");
agvContainerTaskService.insertAgvContainerTask(agvContainerTask);
return AjaxResult.success();
}
// 保存agv执行队列
@GetMapping("/selectAgvPointByType")
@ResponseBody
public AjaxResult selectAgvPointByType(String type, String position) {
System.out.println(type + " " + position);
AgvPoint agvPoint = new AgvPoint();
// agvPoint.setType(type);
agvPoint.setStation(position);
List<AgvPoint> agvPoints = agvPointService.selectAgvPointList(agvPoint);
return AjaxResult.success(agvPoints);
}
// // 查询子单据的明细信息
// @RequestMapping("/selectDetailById")
// public AjaxResult selectDetailById(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
// String inStockinDetailId = trayCodeMakeSure.getInStockinDetailId();
// InStockinDetail inStockinDetail = iInStockinDetailService.selectInStockinDetailByStockinDetailId(inStockinDetailId);
// return AjaxResult.success(inStockinDetail);
//
// }
@RequestMapping("/selectByTrayCode")
public AjaxResult selectByTrayCode(@RequestBody TrayCodeMakeSure trayCodeMakeSure) {
MydoJob mydoJob = mydoJobService.selectMydoJobByTrayCode(trayCodeMakeSure.getTrayCode());
if (mydoJob != null && mydoJob.getInOrOut().equals("26")) {
BasStock basStock = basStockService.selectBasStockListTopOne(trayCodeMakeSure.getTrayCode());
return AjaxResult.success(basStock);
} else {
return AjaxResult.error("该托盘无盘任务");
}
}
}

View File

@@ -1,6 +1,7 @@
package com.ruoyi.pda.domain;
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.job.mydojobdetail.domain.PkDetail;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -22,10 +23,18 @@ public class TrayCodeMakeSure {
private String exitId;
private String isFull;
// 选中传1 没选中传0
private String isBoundByAccord;
//拣选详情列表
private List<MydoJobDetail> mydoJobDetailList;
//盘点详情列表
private List<MydoJobDetail> materials;
//异常详情列表
private List<MydoJobDetail> materialDetails;
private List<PkDetail> pkDetailList;
private String quantity;
private String stockinDetailId;
private String inStockinDetailId;
private String stockoutDetailId;
private String cargoSpaceId;
}

View File

@@ -1,5 +1,7 @@
package com.ruoyi.pda.domain;
import java.util.List;
public class TrayCodeMsg {
private String trayCode;
@@ -18,6 +20,26 @@ private String stockinDetailId;
private String inOut;
private String status;
private String stockoutDetailId;
public String getStockoutDetailId() {
return stockoutDetailId;
}
public void setStockoutDetailId(String stockoutDetailId) {
this.stockoutDetailId = stockoutDetailId;
}
private String trayType;
public String getTrayType() {
return trayType;
}
public void setTrayType(String trayType) {
this.trayType = trayType;
}
public String getStatus() {
return status;

View File

@@ -38,4 +38,18 @@ public interface PdaMapper {
void pkOut(HashMap<String, Object> map);
void outMakeSureException(HashMap<String, Object> map);
void hcoutMakesure(HashMap<String, Object> map);
Integer selectByTrayCodeAndProduct(String trayCode, String productId);
void completeOutPk(HashMap<String, Object> map);
void completeInPk(HashMap<String, Object> map);
void FillFinishAllot(HashMap<String, Object> map);
void FillFinishAllotOut(HashMap<String, Object> map);
void bindTrayCheck(HashMap<String, Object> map);
}

View File

@@ -8,6 +8,7 @@ import com.ruoyi.pda.domain.TrayCodeMakeSure;
import com.ruoyi.pda.domain.TrayCodeMsg;
import com.ruoyi.stock.stock.domain.BasStock;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -28,7 +29,7 @@ public interface PdaService {
AjaxResult bindTray(TrayCodeMakeSure trayCodeMakeSure);
AjaxResult tpIn(String trayCode);
AjaxResult tpIn(TrayCodeMsg trayCodeMsg);
AjaxResult tpOut(TrayCodeMsg trayCodeMsg);
@@ -56,4 +57,19 @@ public interface PdaService {
AjaxResult updateWcsPort(WcsPort wcsport);
AjaxResult hcoutMakesure(String trayCode);
AjaxResult completeInPk(TrayCodeMakeSure trayCodeMakeSure);
AjaxResult selectBasStockHc(String trayCode);
Integer selectByTrayCodeAndProduct(String trayCode, String productId);
void completeOutPk(HashMap<String, Object> map);
Integer selectBasStockHcCount(String trayCode, String productId);
AjaxResult selectBasStockHcs(String trayCode, String stockoutDetailId);
AjaxResult bindTray2(TrayCodeMakeSure trayCodeMakeSure);
}

View File

@@ -9,17 +9,19 @@ import com.ruoyi.api.service.IToWmsService;
import com.ruoyi.check.commit.domain.CheckCommitRecord;
import com.ruoyi.check.commit.service.ICheckCommitRecordService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.in.stockin.domain.InStockin;
import com.ruoyi.in.stockin.service.IInStockinService;
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
import com.ruoyi.in.stockindetail.service.IInStockinDetailService;
import com.ruoyi.job.mydojob.domain.MydoJob;
import com.ruoyi.job.mydojob.service.IMydoJobService;
import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail;
import com.ruoyi.job.mydojobdetail.domain.PkDetail;
import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService;
import com.ruoyi.job.mydojobdetail.service.impl.MydoJobDetailServiceImpl;
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
import com.ruoyi.out.outStockoutDetail.service.impl.OutStockoutDetailServiceImpl;
import com.ruoyi.pda.domain.TrayCodeMakeSure;
import com.ruoyi.pda.domain.TrayCodeMsg;
import com.ruoyi.pda.mapper.PdaMapper;
@@ -34,6 +36,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
@Service
@Slf4j
@@ -60,13 +63,14 @@ public class PdaServiceImp implements PdaService {
private BasStockMapper basStockMapper;
@Autowired
private IInStockinService inStockinService;
@Autowired
private OutStockoutDetailServiceImpl outStockoutDetailService;
@Override
public List<BasStock> selectHasHalfTray(String inStockinDetailId) {
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(inStockinDetailId);
InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
inStockinDetail.setSpare4(inStockin.getDepartmentNo());
// InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
// inStockinDetail.setSpare4(inStockinDetail.getSpare4());
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
return hasHalfTray;
}
@@ -75,16 +79,16 @@ public class PdaServiceImp implements PdaService {
@Override
public AjaxResult halfTrayOut(TrayCodeMsg trayCodeMsg) {
InStockinDetail inStockinDetail = inStockinDetailService.selectInStockinDetailByStockinDetailId(trayCodeMsg.getStockinDetailId());
InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
inStockinDetail.setSpare4(inStockin.getDepartmentNo());
// InStockin inStockin = inStockinService.selectInStockinByStockinId(inStockinDetail.getStockinId());
// inStockinDetail.setSpare4(inStockin.getDepartmentNo());
List<BasStock> hasHalfTray = basStockMapper.selectHasHalfTray(inStockinDetail);
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", hasHalfTray.get(0).getTrayCode());
map.put("v_exit_id",trayCodeMsg.getExitId());
map.put("v_exit_id", trayCodeMsg.getExitId());
pdaMapper.halfTrayOut(map);
if(!"10".equals(map.get("v_result").toString())){
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
} else {
return AjaxResult.success();
}
@@ -112,21 +116,18 @@ public class PdaServiceImp implements PdaService {
@Transactional(rollbackFor = Exception.class)
public AjaxResult bindTray(TrayCodeMakeSure trayCodeMakeSure) {
StringBuilder errorbulider = new StringBuilder();
for (MydoJobDetail mydoJobDetail : trayCodeMakeSure.getMydoJobDetailList()) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_stockin_detail_id", mydoJobDetail.getStockinDetailId());
map.put("v_is_bound_accord", trayCodeMakeSure.getIsBoundByAccord());
map.put("v_quantity", Integer.valueOf(mydoJobDetail.getInQuantity()));
pdaMapper.bindTray(map);
if (!"10".equals(map.get("v_result").toString())) {
errorbulider.append(mydoJobDetail.getStockinDetailId() + map.get("v_resultmsg").toString());
return AjaxResult.error(errorbulider.toString());
}
}
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_is_full", trayCodeMakeSure.getIsFull());
@@ -134,18 +135,19 @@ public class PdaServiceImp implements PdaService {
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(errorbulider.toString());
}
return AjaxResult.success();
}
@Override
public AjaxResult tpIn(String trayCode) {
public AjaxResult tpIn(TrayCodeMsg trayCodeMsg) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCode);
map.put("v_tray_code", trayCodeMsg.getTrayCode());
map.put("v_tray_type", trayCodeMsg.getTrayType());
map.put("v_quantity", Integer.valueOf(trayCodeMsg.getInQuantity()));
pdaMapper.tpIn(map);
if(!"10".equals(map.get("v_result").toString())){
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
} else {
return AjaxResult.success();
}
@@ -155,11 +157,11 @@ public class PdaServiceImp implements PdaService {
public AjaxResult tpOut(TrayCodeMsg trayCodeMsg) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_exit_id", trayCodeMsg.getExitId());
map.put("v_tray_type", trayCodeMsg.getTrayType());
pdaMapper.tpOut(map);
if(!"10".equals(map.get("v_result").toString())){
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_resultmsg").toString());
}else{
} else {
return AjaxResult.success();
}
}
@@ -197,9 +199,10 @@ public class PdaServiceImp implements PdaService {
@Override
public AjaxResult selectDetailByPDTray(TrayCodeMakeSure trayCodeMakeSure) {
MydoJob mydoJob = new MydoJob();
mydoJob.setExitId(trayCodeMakeSure.getExitId());
// mydoJob.setExitId(trayCodeMakeSure.getExitId());
mydoJob.setStatus("3");
mydoJob.setInOrOut("26");
mydoJob.setInOrOut("28");
mydoJob.setTrayCode(trayCodeMakeSure.getTrayCode());
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectPdMydoJobDetailListByExit(mydoJob);
return AjaxResult.success(mydoJobDetails);
}
@@ -237,9 +240,9 @@ public class PdaServiceImp implements PdaService {
public AjaxResult checkMakeSure(TrayCodeMakeSure trayCodeMakeSure) {
MydoJob mydoJob = new MydoJob();
mydoJob.setExitId(trayCodeMakeSure.getExitId());
mydoJob.setTrayCode(trayCodeMakeSure.getTrayCode());
mydoJob.setStatus("3");
mydoJob.setInOrOut("26");
mydoJob.setInOrOut("28");
List<MydoJobDetail> mydoJobDetails = mydoJobDetailService.selectPdMydoJobDetailListByExit(mydoJob);
if (mydoJobDetails.isEmpty()) {
return AjaxResult.error("该物料没有盘点出库作业,请检查");
@@ -249,7 +252,7 @@ public class PdaServiceImp implements PdaService {
if (CollUtil.isNotEmpty(mydoJobDetailList)) {
boolean flag = mydoJobDetailList.stream().anyMatch(x -> StrUtil.isEmpty(x.getStockId()) && "0".equals(x.getInQuantity()));
if (flag) {
return AjaxResult.warn(MessageUtils.message("warn.message8"));
return AjaxResult.warn(MessageUtils.message("盘点数量不可为0"));
}
for (MydoJobDetail mydoJobDetail : mydoJobDetailList) {
//插入盘点提交表
@@ -287,4 +290,104 @@ public class PdaServiceImp implements PdaService {
AjaxResult ajaxResult = toWcsService.updateWcsPort(wcsport);
return ajaxResult;
}
@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());
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult completeInPk(TrayCodeMakeSure trayCodeMakeSure) {
for (PkDetail pkDetail : trayCodeMakeSure.getPkDetailList()) {
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_in_stockin_detail_id", pkDetail.getStockinDetailId());
map.put("v_quantity", pkDetail.getQuantity());
map.put("v_cargo_space_id", trayCodeMakeSure.getCargoSpaceId());
pdaMapper.completeInPk(map);
if (!"10".equals(String.valueOf(map.get("v_result")))) {
String errorMessage = Objects.toString(map.get("v_result_msg"), "平库入库失败");
throw new ServiceException(errorMessage);
}
}
return AjaxResult.success();
}
@Override
public AjaxResult selectBasStockHc(String trayCode) {
BasStock basStock = new BasStock();
basStock.setTrayCode(trayCode);
List<BasStock> stocks = basStockMapper.selectBasStockListHc(basStock);
if (stocks.size() > 0) {
return AjaxResult.success(stocks);
} else {
return AjaxResult.error("无库存信息");
}
}
@Override
public Integer selectByTrayCodeAndProduct(String trayCode, String productId) {
return pdaMapper.selectByTrayCodeAndProduct(trayCode, productId);
}
@Override
public void completeOutPk(HashMap<String, Object> map) {
pdaMapper.completeOutPk(map);
}
@Override
public Integer selectBasStockHcCount(String trayCode, String productId) {
BasStock basStock = new BasStock();
basStock.setTrayCode(trayCode);
basStock.setProductId(productId);
List<BasStock> basStocks = basStockMapper.selectBasStockHcCount(basStock);
return basStocks.size();
}
@Override
public AjaxResult selectBasStockHcs(String trayCode, String stockoutDetailId) {
OutStockoutDetail outStockoutDetail = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(stockoutDetailId);
List<BasStock> stocks = basStockMapper.selectBasStockHcs(trayCode, outStockoutDetail);
if (stocks.size() > 0) {
return AjaxResult.success(stocks);
}
{
return AjaxResult.error("该托盘无对应库存,请检查!");
}
}
@Override
public AjaxResult bindTray2(TrayCodeMakeSure trayCodeMakeSure) {
String collect = trayCodeMakeSure.getMydoJobDetailList().stream().map(detail -> detail.getStockinDetailId() + ":" + detail.getInQuantity()).collect(Collectors.joining(","));
HashMap<String, Object> map = new HashMap<>();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_string", collect);
map.put("v_is_bound_accord", trayCodeMakeSure.getIsBoundByAccord());
pdaMapper.bindTray(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_result").toString());
}
map.clear();
map.put("v_tray_code", trayCodeMakeSure.getTrayCode());
map.put("v_is_full", trayCodeMakeSure.getIsFull());
pdaMapper.addInJob(map);
if (!"10".equals(map.get("v_result").toString())) {
return AjaxResult.error(map.get("v_result").toString());
}
return AjaxResult.success();
}
}

View File

@@ -58,9 +58,10 @@ public class BasStockController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('stock:management:query')")
@GetMapping(value = "/{stockId}")
public AjaxResult getInfo(@PathVariable("stockId") String stockId)
public AjaxResult getInfo(@PathVariable("stockId") String stockId, @RequestParam(value = "warehouseCode", required = false) String warehouseCode)
{
return success(basStockService.selectBasStockByStockId(stockId));
BasStock basStock = basStockService.selectBasStockByStockId2(stockId, warehouseCode);
return success(basStock);
}
/**
@@ -91,9 +92,10 @@ public class BasStockController extends BaseController
@PreAuthorize("@ss.hasPermi('stock:management:remove')")
@Log(title = "库存信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{stockIds}")
public AjaxResult remove(@PathVariable String[] stockIds)
public AjaxResult remove(@PathVariable String[] stockIds,@RequestParam(value = "warehouseCode",required = false) String warehouseCode)
{
return toAjax(basStockService.deleteBasStockByStockIds(stockIds));
System.out.println(warehouseCode);
return toAjax(basStockService.deleteBasStockByStockIds2(stockIds,warehouseCode));
}
/**

View File

@@ -11,6 +11,7 @@ import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.data.annotation.Transient;
import java.util.List;
@@ -184,6 +185,8 @@ public class BasStock extends BaseEntity
/** 仓库 */
// @Excel(name = "${stock.BasStock.warehouseId}")
private String warehouseId;
@Transient
private String warehouseCode;
/** 垛型ID */

View File

@@ -1,6 +1,7 @@
package com.ruoyi.stock.stock.mapper;
import com.ruoyi.in.stockindetail.domain.InStockinDetail;
import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail;
import com.ruoyi.stock.stock.domain.BasStock;
import org.apache.ibatis.annotations.Param;
@@ -73,4 +74,20 @@ public interface BasStockMapper
List<BasStock> getStockBySerial(String trayCode);
List<BasStock> selectHasHalfTray(InStockinDetail inStockinDetail);
List<BasStock> selectBasStockHcCount(BasStock basStock);
List<BasStock> selectBasStockListHc(BasStock basStock);
BasStock selectBasStockByStockId2(String stockId, String warehouseCode);
int updateBasStock2(BasStock basStock);
int deleteBasStockByStockIds2(@Param("stockIds") String[] stockIds, @Param("warehouseCode")String warehouseCode);
List<BasStock> selectBasStockList2(BasStock basStock);
List<BasStock> selectBasStockHcs(@Param("trayCode") String trayCode, @Param("out") OutStockoutDetail outStockoutDetail);
BasStock selectBasStockListTopOne(String trayCode);
}

View File

@@ -83,4 +83,10 @@ public interface IBasStockService
AjaxResult resetPdRecord();
List<BasStock> getStockBySerial(String serial);
BasStock selectBasStockByStockId2(String stockId, String warehouseCode);
int deleteBasStockByStockIds2(String[] stockIds,String warehouseCode);
BasStock selectBasStockListTopOne(String trayCode);
}

View File

@@ -58,7 +58,7 @@ public class BasStockServiceImpl implements IBasStockService
@Override
public List<BasStock> selectBasStockList(BasStock basStock)
{
return basStockMapper.selectBasStockList(basStock);
return basStockMapper.selectBasStockList2(basStock);
}
/**
* 无权限查询库存信息列表
@@ -115,10 +115,10 @@ public class BasStockServiceImpl implements IBasStockService
@Override
public int updateBasStock(BasStock basStock)
{
BasStock oldBasStock = basStockMapper.selectBasStockByStockId(basStock.getStockId());
BasStock oldBasStock = basStockMapper.selectBasStockByStockId2(basStock.getStockId(),basStock.getWarehouseCode());
insertMaintainRecord(oldBasStock,basStock,"2");
insertFreezeRecord(oldBasStock,basStock);
return basStockMapper.updateBasStock(basStock);
return basStockMapper.updateBasStock2(basStock);
}
private void insertFreezeRecord(BasStock oldBasStock, BasStock basStock) {
@@ -194,6 +194,28 @@ public class BasStockServiceImpl implements IBasStockService
return basStockMapper.getStockBySerial(trayCode);
}
@Override
public BasStock selectBasStockByStockId2(String stockId, String warehouseCode) {
return basStockMapper.selectBasStockByStockId2(stockId,warehouseCode);
}
@Override
@Transactional(rollbackFor = Exception.class)
public int deleteBasStockByStockIds2(String[] stockIds,String warehouseCode)
{
for (String stockId : stockIds) {
BasStock oldBasStock = basStockMapper.selectBasStockByStockId2(stockId,warehouseCode);
insertMaintainRecord(oldBasStock,oldBasStock,"3");
}
return basStockMapper.deleteBasStockByStockIds2(stockIds,warehouseCode);
}
@Override
public BasStock selectBasStockListTopOne(String trayCode) {
return basStockMapper.selectBasStockListTopOne(trayCode);
}
/**
* 新增库存信息(不记录维护记录)
*

View File

@@ -6,14 +6,14 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:sqlserver://172.16.4.141:1433;databaseName=FT546-wms;encrypt=true;trustServerCertificate=true;
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT546-WMS;encrypt=false;
username: sa
password: Flrd0914.
password: 123456
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url: jdbc:mariadb://172.16.4.141:3307/mydb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mariadb://172.16.4.12:3307/mydb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: Flrd0914.
# 初始连接数

View File

@@ -66,12 +66,12 @@ spring:
devtools:
restart:
# 热部署开关
enabled: true
enabled: false
data:
# redis 配置
redis:
# 地址
host: 172.16.4.141
host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 数据库索引
@@ -133,7 +133,12 @@ token:
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
expireTime: 43800
# 授权码配置
license:
# 首次部署需先执行 sql/sys_license.sql 并激活授权码,再改为 true 启用拦截
enabled: false
@@ -175,4 +180,6 @@ xss:
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -19,21 +19,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectAgvContainerTaskVo">
select id, container, start_point, end_point, create_time, start_time, finish_time, task_no, status, spare1, spare2 from agv_container_task
select top 1 id, container, start_point, end_point, create_time, start_time, finish_time, task_no, status, spare1, spare2 from agv_container_task
</sql>
<select id="selectAgvContainerTaskList" parameterType="AgvContainerTask" resultMap="AgvContainerTaskResult">
<include refid="selectAgvContainerTaskVo"/>
<where>
<if test="container != null and container != ''"> and container = #{container}</if>
<if test="startPoint != null and startPoint != ''"> and start_point = #{startPoint}</if>
<if test="endPoint != null and endPoint != ''"> and end_point = #{endPoint}</if>
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
<if test="container != null and container != ''"> and container like concat('%', #{container}, '%')</if>
<if test="startPoint != null and startPoint != ''"> and start_point like concat('%', #{startPoint}, '%')</if>
<if test="endPoint != null and endPoint != ''"> and end_point like concat('%', #{endPoint}, '%')</if>
<if test="startTime != null and startTime != ''"> and start_time like concat('%', #{startTime}, '%')</if>
<if test="finishTime != null and finishTime != ''"> and finish_time like concat('%', #{finishTime}, '%')</if>
<if test="taskNo != null and taskNo != ''"> and task_no like concat('%', #{taskNo}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
</where>
</select>
@@ -101,4 +101,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteAgvJobByOrder" parameterType="string">
delete from agv_container_task where container = #{order}
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -28,14 +28,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectChatMessageList" parameterType="ChatMessage" resultMap="ChatMessageResult">
<include refid="selectChatMessageVo"/>
<where>
<if test="sessionId != null "> and session_id = #{sessionId}</if>
<if test="conversationId != null "> and conversation_id = #{conversationId}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="role != null and role != ''"> and role = #{role}</if>
<if test="deductCost != null "> and deduct_cost = #{deductCost}</if>
<if test="totalTokens != null "> and total_tokens = #{totalTokens}</if>
<if test="sessionId != null "> and session_id like concat('%', #{sessionId}, '%')</if>
<if test="conversationId != null "> and conversation_id like concat('%', #{conversationId}, '%')</if>
<if test="content != null and content != ''"> and content like concat('%', #{content}, '%')</if>
<if test="role != null and role != ''"> and role like concat('%', #{role}, '%')</if>
<if test="deductCost != null "> and deduct_cost like concat('%', #{deductCost}, '%')</if>
<if test="totalTokens != null "> and total_tokens like concat('%', #{totalTokens}, '%')</if>
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
<if test="createDept != null "> and create_dept = #{createDept}</if>
<if test="createDept != null "> and create_dept like concat('%', #{createDept}, '%')</if>
</where>
order by create_time asc
</select>
@@ -115,3 +115,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from chat_message where conversation_id = #{conversationId}
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -26,17 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectConversationsList" parameterType="Conversations" resultMap="ConversationsResult">
<include refid="selectConversationsVo"/>
<where>
<if test="sessionId != null and sessionId != ''"> and session_id = #{sessionId}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="metadata != null and metadata != ''"> and metadata = #{metadata}</if>
<if test="firstQuery != null and firstQuery != ''"> and first_query = #{firstQuery}</if>
<if test="messageCount != null "> and message_count = #{messageCount}</if>
<if test="tokenUsage != null "> and token_usage = #{tokenUsage}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="lastInteractionAt != null "> and last_interaction_at = #{lastInteractionAt}</if>
<if test="sessionId != null and sessionId != ''"> and session_id like concat('%', #{sessionId}, '%')</if>
<if test="userId != null and userId != ''"> and user_id like concat('%', #{userId}, '%')</if>
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="metadata != null and metadata != ''"> and metadata like concat('%', #{metadata}, '%')</if>
<if test="firstQuery != null and firstQuery != ''"> and first_query like concat('%', #{firstQuery}, '%')</if>
<if test="messageCount != null "> and message_count like concat('%', #{messageCount}, '%')</if>
<if test="tokenUsage != null "> and token_usage like concat('%', #{tokenUsage}, '%')</if>
<if test="createdAt != null "> and created_at like concat('%', #{createdAt}, '%')</if>
<if test="updatedAt != null "> and updated_at like concat('%', #{updatedAt}, '%')</if>
<if test="lastInteractionAt != null "> and last_interaction_at like concat('%', #{lastInteractionAt}, '%')</if>
order by id desc
</where>
</select>
@@ -105,3 +105,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -26,17 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectKnowledgeFileList" parameterType="KnowledgeFile" resultMap="KnowledgeFileResult">
<include refid="selectKnowledgeFileVo"/>
<where>
<if test="knowledgeBaseId != null "> and knowledge_base_id = #{knowledgeBaseId}</if>
<if test="knowledgeBaseId != null "> and knowledge_base_id like concat('%', #{knowledgeBaseId}, '%')</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="filePath != null and filePath != ''"> and file_path = #{filePath}</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="isVectorized != null "> and is_vectorized = #{isVectorized}</if>
<if test="vectorizedTime != null "> and vectorized_time = #{vectorizedTime}</if>
<if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
<if test="filePath != null and filePath != ''"> and file_path like concat('%', #{filePath}, '%')</if>
<if test="fileSize != null "> and file_size like concat('%', #{fileSize}, '%')</if>
<if test="fileType != null and fileType != ''"> and file_type like concat('%', #{fileType}, '%')</if>
<if test="description != null and description != ''"> and description like concat('%', #{description}, '%')</if>
<if test="isVectorized != null "> and is_vectorized like concat('%', #{isVectorized}, '%')</if>
<if test="vectorizedTime != null "> and vectorized_time like concat('%', #{vectorizedTime}, '%')</if>
<if test="uploadTime != null "> and upload_time like concat('%', #{uploadTime}, '%')</if>
<if test="updatedAt != null "> and updated_at like concat('%', #{updatedAt}, '%')</if>
<if test="isDeleted != null "> and is_deleted like concat('%', #{isDeleted}, '%')</if>
</where>
</select>
@@ -103,4 +103,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -23,14 +23,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasContainerDetailsList" parameterType="BasContainerDetails" resultMap="BasContainerDetailsResult">
<include refid="selectBasContainerDetailsVo"/>
<where>
<if test="containerId != null and containerId != ''"> and container_id = #{containerId}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="containerId != null and containerId != ''"> and container_id like concat('%', #{containerId}, '%')</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null "> and quantity = #{quantity}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="quantity != null "> and quantity like concat('%', #{quantity}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
</where>
</select>
@@ -90,4 +90,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -26,11 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectBasContainerVo"/>
<where>
<if test="containerId != null and containerId != ''"> and container_id like concat('%', #{containerId}, '%')</if>
<if test="portName != null and portName != ''"> and port_name = #{portName}</if>
<if test="status != null "> and status = #{status}</if>
<if test="productTypeQuantity != null "> and product_type_quantity = #{productTypeQuantity}</if>
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime}</if>
<if test="operationMan != null and operationMan != ''"> and operation_man = #{operationMan}</if>
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
<if test="status != null "> and status like concat('%', #{status}, '%')</if>
<if test="productTypeQuantity != null "> and product_type_quantity like concat('%', #{productTypeQuantity}, '%')</if>
<if test="updateTime != null and updateTime != ''"> and update_time like concat('%', #{updateTime}, '%')</if>
<if test="operationMan != null and operationMan != ''"> and operation_man like concat('%', #{operationMan}, '%')</if>
</where>
</select>
@@ -102,4 +102,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPortNames" resultType="string">
SELECT DISTINCT port_name FROM bas_product_port WHERE port_name != null or port_name != ''
</select>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="customerGroupNo != null and customerGroupNo != ''"> and customer_group_no like concat('%', #{customerGroupNo}, '%')</if>
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
<if test="useable != null and useable != ''"> and useable like concat('%', #{useable}, '%')</if>
<if test="businessDepartment != null and businessDepartment != ''"> and business_department like concat('%', #{businessDepartment}, '%')</if>
<if test="salesman != null and salesman != ''"> and salesman like concat('%', #{salesman}, '%')</if>
<if test="mnemonicCode != null and mnemonicCode != ''"> and mnemonic_code like concat('%', #{mnemonicCode}, '%')</if>
@@ -149,4 +149,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -34,25 +34,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasJobIdList" parameterType="BasJobId" resultMap="BasJobIdResult">
<include refid="selectBasJobIdVo"/>
<where>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
<if test="jobDetail != null and jobDetail != ''"> and job_detail = #{jobDetail}</if>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="exorderId != null and exorderId != ''"> and Exorder_id = #{exorderId}</if>
<if test="jobIdR != null and jobIdR != ''"> and job_id_R = #{jobIdR}</if>
<if test="jobDetailR != null and jobDetailR != ''"> and job_detail_R = #{jobDetailR}</if>
<if test="jobIdC != null and jobIdC != ''"> and job_id_C = #{jobIdC}</if>
<if test="jobDetailC != null and jobDetailC != ''"> and job_detail_C = #{jobDetailC}</if>
<if test="tempOrderId != null and tempOrderId != ''"> and temp_order_id = #{tempOrderId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id = #{stockinDetailId}</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
<if test="planId != null and planId != ''"> and plan_id = #{planId}</if>
<if test="jobIdY != null and jobIdY != ''"> and job_id_y = #{jobIdY}</if>
<if test="jobIdS != null and jobIdS != ''"> and job_id_s = #{jobIdS}</if>
<if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
<if test="jobId != null and jobId != ''"> and job_id like concat('%', #{jobId}, '%')</if>
<if test="jobDetail != null and jobDetail != ''"> and job_detail like concat('%', #{jobDetail}, '%')</if>
<if test="stockId != null and stockId != ''"> and stock_id like concat('%', #{stockId}, '%')</if>
<if test="orderId != null and orderId != ''"> and order_id like concat('%', #{orderId}, '%')</if>
<if test="exorderId != null and exorderId != ''"> and Exorder_id like concat('%', #{exorderId}, '%')</if>
<if test="jobIdR != null and jobIdR != ''"> and job_id_R like concat('%', #{jobIdR}, '%')</if>
<if test="jobDetailR != null and jobDetailR != ''"> and job_detail_R like concat('%', #{jobDetailR}, '%')</if>
<if test="jobIdC != null and jobIdC != ''"> and job_id_C like concat('%', #{jobIdC}, '%')</if>
<if test="jobDetailC != null and jobDetailC != ''"> and job_detail_C like concat('%', #{jobDetailC}, '%')</if>
<if test="tempOrderId != null and tempOrderId != ''"> and temp_order_id like concat('%', #{tempOrderId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id like concat('%', #{stockinId}, '%')</if>
<if test="stockinDetailId != null and stockinDetailId != ''"> and stockin_detail_id like concat('%', #{stockinDetailId}, '%')</if>
<if test="stockoutId != null and stockoutId != ''"> and stockout_id like concat('%', #{stockoutId}, '%')</if>
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id like concat('%', #{stockoutDetailId}, '%')</if>
<if test="planId != null and planId != ''"> and plan_id like concat('%', #{planId}, '%')</if>
<if test="jobIdY != null and jobIdY != ''"> and job_id_y like concat('%', #{jobIdY}, '%')</if>
<if test="jobIdS != null and jobIdS != ''"> and job_id_s like concat('%', #{jobIdS}, '%')</if>
</where>
</select>
@@ -162,3 +162,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasProductCodeList" parameterType="BasProductCode" resultMap="BasProductCodeResult">
<include refid="selectBasProductCodeVo"/>
<where>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="model != null and model != ''"> and model like concat('%', #{model}, '%')</if>
<if test="color != null and color != ''"> and color like concat('%', #{color}, '%')</if>
<if test="serial != null and serial != ''"> and serial like concat('%', #{serial}, '%')</if>
<if test="v != null and v != ''"> and v like concat('%', #{v}, '%')</if>
@@ -39,13 +39,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ph != null and ph != ''"> and ph like concat('%', #{ph}, '%')</if>
<if test="nW != null and nW != ''"> and n_w like concat('%', #{nW}, '%')</if>
<if test="gW != null and gW != ''"> and g_w like concat('%', #{gW}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="type != null and type != ''"> and type like concat('%', #{type}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
</where>
</select>
@@ -129,4 +129,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectBasProductPortVo"/>
<where>
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
<if test="portType != null and portType != ''"> and port_type = #{portType}</if>
<if test="portDesc != null and portDesc != ''"> and port_desc = #{portDesc}</if>
<if test="createMan != null and createMan != ''"> and create_man = #{createMan}</if>
<if test="portType != null and portType != ''"> and port_type like concat('%', #{portType}, '%')</if>
<if test="portDesc != null and portDesc != ''"> and port_desc like concat('%', #{portDesc}, '%')</if>
<if test="createMan != null and createMan != ''"> and create_man like concat('%', #{createMan}, '%')</if>
</where>
</select>
@@ -74,4 +74,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -43,9 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasProductPortRelList" parameterType="BasProductPortRel" resultMap="BasProductPortRelResult">
<include refid="selectBasProductPortRelVo"/>
<where>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="portId != null and portId != ''"> and port_id = #{portId}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid like concat('%', #{productGuid}, '%')</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="portId != null and portId != ''"> and port_id like concat('%', #{portId}, '%')</if>
</where>
</select>
@@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bindStatus =='0'.toString()">
and product_id not in (select product_id from bas_product_port_rel where port_id=#{portId})
</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
</where>
@@ -112,3 +112,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -23,14 +23,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasRoadwayList" parameterType="BasRoadway" resultMap="BasRoadwayResult">
<include refid="selectBasRoadwayVo"/>
<where>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id like concat('%', #{roadwayId}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="roadwayName != null and roadwayName != ''"> and roadway_name like concat('%', #{roadwayName}, '%')</if>
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
<if test="inLocked != null and inLocked != ''"> and in_locked = #{inLocked}</if>
<if test="outLocked != null and outLocked != ''"> and out_locked = #{outLocked}</if>
<if test="inLocked2 != null and inLocked2 != ''"> and in_locked2 = #{inLocked2}</if>
<if test="outLocked2 != null and outLocked2 != ''"> and out_locked2 = #{outLocked2}</if>
<if test="deviceId != null and deviceId != ''"> and device_id like concat('%', #{deviceId}, '%')</if>
<if test="inLocked != null and inLocked != ''"> and in_locked like concat('%', #{inLocked}, '%')</if>
<if test="outLocked != null and outLocked != ''"> and out_locked like concat('%', #{outLocked}, '%')</if>
<if test="inLocked2 != null and inLocked2 != ''"> and in_locked2 like concat('%', #{inLocked2}, '%')</if>
<if test="outLocked2 != null and outLocked2 != ''"> and out_locked2 like concat('%', #{outLocked2}, '%')</if>
</where>
</select>
@@ -90,4 +90,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="supplierGroupNo != null and supplierGroupNo != ''"> and supplier_group_no like concat('%', #{supplierGroupNo}, '%')</if>
<if test="supplierName != null and supplierName != ''"> and supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="simpleName != null and simpleName != ''"> and simple_name like concat('%', #{simpleName}, '%')</if>
<if test="useable != null and useable != ''"> and useable = #{useable}</if>
<if test="useable != null and useable != ''"> and useable like concat('%', #{useable}, '%')</if>
<if test="supplierArae != null and supplierArae != ''"> and supplier_arae like concat('%', #{supplierArae}, '%')</if>
<if test="taxpayerRegistrationNumber != null and taxpayerRegistrationNumber != ''"> and taxpayer_registration_number like concat('%', #{taxpayerRegistrationNumber}, '%')</if>
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
@@ -139,4 +139,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -23,14 +23,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasTagList" parameterType="BasTag" resultMap="BasTagResult">
<include refid="selectBasTagVo"/>
<where>
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
<if test="pickAdd != null and pickAdd != ''"> and pick_add = #{pickAdd}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="curNum != null and curNum != ''"> and cur_num = #{curNum}</if>
<if test="sendCompleted != null and sendCompleted != ''"> and send_completed = #{sendCompleted}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="ip != null and ip != ''"> and ip like concat('%', #{ip}, '%')</if>
<if test="pickAdd != null and pickAdd != ''"> and pick_add like concat('%', #{pickAdd}, '%')</if>
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
<if test="curNum != null and curNum != ''"> and cur_num like concat('%', #{curNum}, '%')</if>
<if test="sendCompleted != null and sendCompleted != ''"> and send_completed like concat('%', #{sendCompleted}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
</where>
</select>
@@ -93,3 +93,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -32,9 +32,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remarks != null and remarks != ''"> and remarks like concat('%',#{remarks}, '%')</if>
<if test="minNum != null "> and min_num like concat('%',#{minNum}, '%')</if>
<if test="maxNum != null "> and max_num like concat('%',#{maxNum}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
</where>
</select>
@@ -103,4 +103,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -26,11 +26,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasTraycodeList" parameterType="BasTraycode" resultMap="BasTraycodeResult">
<include refid="selectBasTraycodeVo"/>
<where>
<if test="formatId != null "> and bt.format_id = #{formatId}</if>
<if test="formatId != null "> and bt.format_id like concat('%', #{formatId}, '%')</if>
<if test="trayCode != null and trayCode != ''"> and bt.tray_code like concat('%',#{trayCode}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and bt.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and bt.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and bt.spare3 = #{spare3}</if>
<if test="spare1 != null and spare1 != ''"> and bt.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and bt.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and bt.spare3 like concat('%', #{spare3}, '%')</if>
</where>
</select>
@@ -98,3 +98,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -19,10 +19,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBasWarehousePortList" parameterType="BasWarehousePort" resultMap="BasWarehousePortResult">
<include refid="selectBasWarehousePortVo"/>
<where>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="portCode != null and portCode != ''"> and port_code = #{portCode}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="portCode != null and portCode != ''"> and port_code like concat('%', #{portCode}, '%')</if>
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
<if test="portType != null and portType != ''"> and port_type = #{portType}</if>
<if test="portType != null and portType != ''"> and port_type like concat('%', #{portType}, '%')</if>
</where>
</select>
@@ -70,4 +70,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -63,24 +63,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectBasCargoSpaceVo"/>
<where>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and bcs.cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id = #{cargoAreaId}</if>
<if test="theType != null and theType != ''"> and bcs.the_type = #{theType}</if>
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id like concat('%', #{roadwayId}, '%')</if>
<if test="cargoAreaId != null and cargoAreaId != ''"> and bcs.cargo_area_id like concat('%', #{cargoAreaId}, '%')</if>
<if test="theType != null and theType != ''"> and bcs.the_type like concat('%', #{theType}, '%')</if>
<if test="theTypeName != null and theTypeName != ''"> and bcs.the_type_name like concat('%', #{theTypeName}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
<if test="thePlatoon != null "> and bcs.the_platoon like concat('%', #{thePlatoon}, '%')</if>
<if test="theColumn != null "> and bcs.the_column like concat('%', #{theColumn}, '%')</if>
<if test="theFloor != null "> and bcs.the_floor like concat('%', #{theFloor}, '%')</if>
<if test="status != null and status != ''"> and bcs.status like concat('%', #{status}, '%')</if>
<if test="locked != null and locked != ''"> and bcs.locked like concat('%', #{locked}, '%')</if>
<if test="trayCode != null and trayCode != ''"> and bcs.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight = #{cargoHight}</if>
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double = #{issDouble}</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no = #{groupCodingNo}</if>
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area = #{thisCargoArea}</if>
<if test="cargoHight != null and cargoHight != ''"> and bcs.cargo_hight like concat('%', #{cargoHight}, '%')</if>
<if test="issDouble != null and issDouble != ''"> and bcs.iss_double like concat('%', #{issDouble}, '%')</if>
<if test="groupCodingNo != null and groupCodingNo != ''"> and bcs.group_coding_no like concat('%', #{groupCodingNo}, '%')</if>
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding like concat('%', #{groupCoding}, '%')</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo like concat('%', #{cargoSpaceLogo}, '%')</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area like concat('%', #{thisCargoArea}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
@@ -188,10 +188,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE status = '1'
and locked = 'N'
<if test="warehouseId != null">
and warehouse_id = #{warehouseId}
and warehouse_id like concat('%', #{warehouseId}, '%')
</if>
<if test="roadwayId != null">
and roadway_id = #{roadwayId}
and roadway_id like concat('%', #{roadwayId}, '%')
</if>
ORDER BY the_platoon, the_floor,the_column
</select>
@@ -202,13 +202,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bcs.the_platoon,
bcs.the_column,
bcs.the_floor,
bcs.status,
bs.tray_code,
bs.product_id,
bs.product_name
bcs.status
from bas_cargo_space bcs
left join bas_stock bs on bcs.cargo_space_id = bs.cargo_space_id
where bcs.status in ('1', '2')
where bcs.status in ( '2')
</select>
<select id="selectBasCargoSpaceListByRoadway" parameterType="BasCargoSpace" resultMap="BasCargoSpaceResult">
select bcs.cargo_space_id, bcs.warehouse_id, bcs.roadway_id, bcs.cargo_space_name,
@@ -219,18 +215,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and br.roadway_id = bcs.roadway_id
and bp.product_id = bs.product_id
and br.out_locked = 'N'
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id = #{warehouseId}</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id = #{roadwayId}</if>
<if test="warehouseId != null and warehouseId != ''"> and bcs.warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="roadwayId != null and roadwayId != ''"> and bcs.roadway_id like concat('%', #{roadwayId}, '%')</if>
<if test="cargoSpaceName != null and cargoSpaceName != ''"> and bcs.cargo_space_name like concat('%', #{cargoSpaceName}, '%')</if>
<if test="thePlatoon != null "> and bcs.the_platoon = #{thePlatoon}</if>
<if test="theColumn != null "> and bcs.the_column = #{theColumn}</if>
<if test="theFloor != null "> and bcs.the_floor = #{theFloor}</if>
<if test="status != null and status != ''"> and bcs.status = #{status}</if>
<if test="locked != null and locked != ''"> and bcs.locked = #{locked}</if>
<if test="thePlatoon != null "> and bcs.the_platoon like concat('%', #{thePlatoon}, '%')</if>
<if test="theColumn != null "> and bcs.the_column like concat('%', #{theColumn}, '%')</if>
<if test="theFloor != null "> and bcs.the_floor like concat('%', #{theFloor}, '%')</if>
<if test="status != null and status != ''"> and bcs.status like concat('%', #{status}, '%')</if>
<if test="locked != null and locked != ''"> and bcs.locked like concat('%', #{locked}, '%')</if>
<if test="trayCode != null and trayCode != ''"> and bs.tray_code like concat('%', #{trayCode}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and bs.spare7 = #{spare7}</if>
<if test="spare7 != null and spare7 != ''"> and bs.spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and bs.spare6 like concat('%', #{spare6}, '%')</if>
<if test="productId != null and productId != ''"> and bs.product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> and bp.product_name like concat('%', #{productName}, '%')</if>
</select>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -29,11 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseName != null and warehouseName != ''">and warehouse_name like concat('%',
#{warehouseName}, '%')
</if>
<if test="address != null and address != ''">and address = #{address}</if>
<if test="cDesc != null and cDesc != ''">and c_desc = #{cDesc}</if>
<if test="warehouseKind != null and warehouseKind != ''">and warehouse_kind = #{warehouseKind}</if>
<if test="warehouseType != null and warehouseType != ''">and warehouse_type = #{warehouseType}</if>
<if test="isCurrent != null and isCurrent != ''">and is_current = #{isCurrent}</if>
<if test="address != null and address != ''">and address like concat('%', #{address}, '%')</if>
<if test="cDesc != null and cDesc != ''">and c_desc like concat('%', #{cDesc}, '%')</if>
<if test="warehouseKind != null and warehouseKind != ''">and warehouse_kind like concat('%', #{warehouseKind}, '%')</if>
<if test="warehouseType != null and warehouseType != ''">and warehouse_type like concat('%', #{warehouseType}, '%')</if>
<if test="isCurrent != null and isCurrent != ''">and is_current like concat('%', #{isCurrent}, '%')</if>
<if test="dataScope !=null and dataScope.size()>0">
and warehouse_id in
<foreach item="item" index="index" collection="dataScope" open="(" separator="," close=")">
@@ -111,3 +111,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -21,13 +21,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCheckCommitRecordList" parameterType="CheckCommitRecord" resultMap="CheckCommitRecordResult">
<include refid="selectCheckCommitRecordVo"/>
<where>
<if test="pdGuid != null "> and pd_guid = #{pdGuid}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="pdGuid != null "> and pd_guid like concat('%', #{pdGuid}, '%')</if>
<if test="trayCode != null and trayCode != ''"> and tray_code like concat('%', #{trayCode}, '%')</if>
<if test="stockId != null and stockId != ''"> and stock_id like concat('%', #{stockId}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity like concat('%', #{quantity}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
</where>
</select>
@@ -79,4 +79,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{pdGuid}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -72,46 +72,46 @@
<include refid="selectCheckDifferenceRecordVo"/>
<where>
<if test="checkStockDetailId != null and checkStockDetailId != ''">
and r.check_stock_detail_id = #{checkStockDetailId}
and r.check_stock_detail_id like concat('%', #{checkStockDetailId}, '%')
</if>
<if test="stockId != null and stockId != ''">
and r.stock_id = #{stockId}
and r.stock_id like concat('%', #{stockId}, '%')
</if>
<if test="trayCode != null and trayCode != ''">
and r.tray_code = #{trayCode}
and r.tray_code like concat('%', #{trayCode}, '%')
</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''">
and r.cargo_space_id = #{cargoSpaceId}
and r.cargo_space_id like concat('%', #{cargoSpaceId}, '%')
</if>
<if test="productId != null and productId != ''">
and r.product_id = #{productId}
and r.product_id like concat('%', #{productId}, '%')
</if>
<if test="lotNo != null and lotNo != ''">
and r.lot_no = #{lotNo}
and r.lot_no like concat('%', #{lotNo}, '%')
</if>
<if test="supplier != null and supplier != ''">
and r.supplier = #{supplier}
and r.supplier like concat('%', #{supplier}, '%')
</if>
<if test="customer != null and customer != ''">
and r.customer = #{customer}
and r.customer like concat('%', #{customer}, '%')
</if>
<if test="oldQuantity != null and oldQuantity != ''">
and r.old_quantity = #{oldQuantity}
and r.old_quantity like concat('%', #{oldQuantity}, '%')
</if>
<if test="newQuantity != null and newQuantity != ''">
and r.new_quantity = #{newQuantity}
and r.new_quantity like concat('%', #{newQuantity}, '%')
</if>
<if test="recordType != null ">
and r.record_type = #{recordType}
and r.record_type like concat('%', #{recordType}, '%')
</if>
<if test="productGuid != null and productGuid != ''">
and r.product_guid = #{productGuid}
and r.product_guid like concat('%', #{productGuid}, '%')
</if>
<if test="status != null and status != ''">
and r.status = #{status}
and r.status like concat('%', #{status}, '%')
</if>
<if test="warehouseId != null and warehouseId != ''">
and r.warehouse_id = #{warehouseId}
and r.warehouse_id like concat('%', #{warehouseId}, '%')
</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
@@ -200,3 +200,4 @@
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -72,46 +72,46 @@
<include refid="selectCheckDifferenceRecordVo"/>
<where>
<if test="checkStockDetailId != null and checkStockDetailId != ''">
and r.check_stock_detail_id = #{checkStockDetailId}
and r.check_stock_detail_id like concat('%', #{checkStockDetailId}, '%')
</if>
<if test="stockId != null and stockId != ''">
and r.stock_id = #{stockId}
and r.stock_id like concat('%', #{stockId}, '%')
</if>
<if test="trayCode != null and trayCode != ''">
and r.tray_code = #{trayCode}
and r.tray_code like concat('%', #{trayCode}, '%')
</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''">
and r.cargo_space_id = #{cargoSpaceId}
and r.cargo_space_id like concat('%', #{cargoSpaceId}, '%')
</if>
<if test="productId != null and productId != ''">
and r.product_id = #{productId}
and r.product_id like concat('%', #{productId}, '%')
</if>
<if test="lotNo != null and lotNo != ''">
and r.lot_no = #{lotNo}
and r.lot_no like concat('%', #{lotNo}, '%')
</if>
<if test="supplier != null and supplier != ''">
and r.supplier = #{supplier}
and r.supplier like concat('%', #{supplier}, '%')
</if>
<if test="customer != null and customer != ''">
and r.customer = #{customer}
and r.customer like concat('%', #{customer}, '%')
</if>
<if test="oldQuantity != null and oldQuantity != ''">
and r.old_quantity = #{oldQuantity}
and r.old_quantity like concat('%', #{oldQuantity}, '%')
</if>
<if test="newQuantity != null and newQuantity != ''">
and r.new_quantity = #{newQuantity}
and r.new_quantity like concat('%', #{newQuantity}, '%')
</if>
<if test="recordType != null ">
and r.record_type = #{recordType}
and r.record_type like concat('%', #{recordType}, '%')
</if>
<if test="productGuid != null and productGuid != ''">
and r.product_guid = #{productGuid}
and r.product_guid like concat('%', #{productGuid}, '%')
</if>
<if test="status != null and status != ''">
and r.status = #{status}
and r.status like concat('%', #{status}, '%')
</if>
<if test="warehouseId != null and warehouseId != ''">
and r.warehouse_id = #{warehouseId}
and r.warehouse_id like concat('%', #{warehouseId}, '%')
</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
@@ -200,3 +200,4 @@
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -98,34 +98,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCheckStockinDetailFinishList" parameterType="CheckStockinDetailFinish" resultMap="CheckStockinDetailFinishResult">
<include refid="selectCheckStockinDetailFinishVo"/>
<where>
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and stock_check_guid = #{stockCheckGuid}</if>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x = #{scanNumX}</if>
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j = #{scanNumJ}</if>
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and stock_check_guid like concat('%', #{stockCheckGuid}, '%')</if>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id like concat('%', #{stockCheckId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productGuid != null and productGuid != ''"> and product_guid like concat('%', #{productGuid}, '%')</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity like concat('%', #{quantity}, '%')</if>
<if test="quantityX != null and quantityX != ''"> and quantity_x like concat('%', #{quantityX}, '%')</if>
<if test="quantityJ != null and quantityJ != ''"> and quantity_j like concat('%', #{quantityJ}, '%')</if>
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="assignNum != null and assignNum != ''"> and assign_num like concat('%', #{assignNum}, '%')</if>
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x like concat('%', #{assignNumX}, '%')</if>
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j like concat('%', #{assignNumJ}, '%')</if>
<if test="printDate != null and printDate != ''"> and print_date like concat('%', #{printDate}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status like concat('%', #{stockStatus}, '%')</if>
<if test="supplierId != null and supplierId != ''"> and supplier_id like concat('%', #{supplierId}, '%')</if>
<if test="customerId != null and customerId != ''"> and customer_id like concat('%', #{customerId}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="scanNum != null and scanNum != ''"> and scan_num like concat('%', #{scanNum}, '%')</if>
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x like concat('%', #{scanNumX}, '%')</if>
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j like concat('%', #{scanNumJ}, '%')</if>
</where>
</select>
@@ -137,34 +137,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
resultMap="CheckStockinDetailResult">
<include refid="selectCheckStockinDetailVo"/>
<where>
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and csd.stock_check_guid = #{stockCheckGuid}</if>
<if test="stockCheckId != null and stockCheckId != ''"> and csd.stock_check_id = #{stockCheckId}</if>
<if test="lotNo != null and lotNo != ''"> and csd.lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and csd.product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and csd.product_id = #{productId}</if>
<if test="quantity != null and quantity != ''"> and csd.quantity = #{quantity}</if>
<if test="quantityX != null and quantityX != ''"> and csd.quantity_x = #{quantityX}</if>
<if test="quantityJ != null and quantityJ != ''"> and csd.quantity_j = #{quantityJ}</if>
<if test="price != null and price != ''"> and csd.price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and csd.cargo_no = #{cargoNo}</if>
<if test="assignNum != null and assignNum != ''"> and csd.assign_num = #{assignNum}</if>
<if test="assignNumX != null and assignNumX != ''"> and csd.assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null and assignNumJ != ''"> and csd.assign_num_j = #{assignNumJ}</if>
<if test="printDate != null and printDate != ''"> and csd.print_date = #{printDate}</if>
<if test="stockStatus != null and stockStatus != ''"> and csd.stock_status = #{stockStatus}</if>
<if test="supplierId != null and supplierId != ''"> and csd.supplier_id = #{supplierId}</if>
<if test="customerId != null and customerId != ''"> and csd.customer_id = #{customerId}</if>
<if test="unit != null and unit != ''"> and csd.unit = #{unit}</if>
<if test="spec != null and spec != ''"> and csd.spec = #{spec}</if>
<if test="scanNum != null and scanNum != ''"> and csd.scan_num = #{scanNum}</if>
<if test="scanNumX != null and scanNumX != ''"> and csd.scan_num_x = #{scanNumX}</if>
<if test="scanNumJ != null and scanNumJ != ''"> and csd.scan_num_j = #{scanNumJ}</if>
<if test="spare1 != null and spare1 != ''"> and csd.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and csd.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and csd.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and csd.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and csd.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and csd.spare6 = #{spare6}</if>
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and csd.stock_check_guid like concat('%', #{stockCheckGuid}, '%')</if>
<if test="stockCheckId != null and stockCheckId != ''"> and csd.stock_check_id like concat('%', #{stockCheckId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and csd.lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productGuid != null and productGuid != ''"> and csd.product_guid like concat('%', #{productGuid}, '%')</if>
<if test="productId != null and productId != ''"> and csd.product_id like concat('%', #{productId}, '%')</if>
<if test="quantity != null and quantity != ''"> and csd.quantity like concat('%', #{quantity}, '%')</if>
<if test="quantityX != null and quantityX != ''"> and csd.quantity_x like concat('%', #{quantityX}, '%')</if>
<if test="quantityJ != null and quantityJ != ''"> and csd.quantity_j like concat('%', #{quantityJ}, '%')</if>
<if test="price != null and price != ''"> and csd.price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and csd.cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="assignNum != null and assignNum != ''"> and csd.assign_num like concat('%', #{assignNum}, '%')</if>
<if test="assignNumX != null and assignNumX != ''"> and csd.assign_num_x like concat('%', #{assignNumX}, '%')</if>
<if test="assignNumJ != null and assignNumJ != ''"> and csd.assign_num_j like concat('%', #{assignNumJ}, '%')</if>
<if test="printDate != null and printDate != ''"> and csd.print_date like concat('%', #{printDate}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and csd.stock_status like concat('%', #{stockStatus}, '%')</if>
<if test="supplierId != null and supplierId != ''"> and csd.supplier_id like concat('%', #{supplierId}, '%')</if>
<if test="customerId != null and customerId != ''"> and csd.customer_id like concat('%', #{customerId}, '%')</if>
<if test="unit != null and unit != ''"> and csd.unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and csd.spec like concat('%', #{spec}, '%')</if>
<if test="scanNum != null and scanNum != ''"> and csd.scan_num like concat('%', #{scanNum}, '%')</if>
<if test="scanNumX != null and scanNumX != ''"> and csd.scan_num_x like concat('%', #{scanNumX}, '%')</if>
<if test="scanNumJ != null and scanNumJ != ''"> and csd.scan_num_j like concat('%', #{scanNumJ}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and csd.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and csd.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and csd.spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and csd.spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and csd.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and csd.spare6 like concat('%', #{spare6}, '%')</if>
</where>
</select>
@@ -283,3 +283,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -63,34 +63,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCheckStockinDetailList" parameterType="CheckStockinDetail" resultMap="CheckStockinDetailResult">
<include refid="selectCheckStockinDetailVo"/>
<where>
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and csd.stock_check_guid = #{stockCheckGuid}</if>
<if test="stockCheckId != null and stockCheckId != ''"> and csd.stock_check_id = #{stockCheckId}</if>
<if test="lotNo != null and lotNo != ''"> and csd.lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and csd.product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and csd.product_id = #{productId}</if>
<if test="quantity != null and quantity != ''"> and csd.quantity = #{quantity}</if>
<if test="quantityX != null and quantityX != ''"> and csd.quantity_x = #{quantityX}</if>
<if test="quantityJ != null and quantityJ != ''"> and csd.quantity_j = #{quantityJ}</if>
<if test="price != null and price != ''"> and csd.price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and csd.cargo_no = #{cargoNo}</if>
<if test="assignNum != null and assignNum != ''"> and csd.assign_num = #{assignNum}</if>
<if test="assignNumX != null and assignNumX != ''"> and csd.assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null and assignNumJ != ''"> and csd.assign_num_j = #{assignNumJ}</if>
<if test="printDate != null and printDate != ''"> and csd.print_date = #{printDate}</if>
<if test="stockStatus != null and stockStatus != ''"> and csd.stock_status = #{stockStatus}</if>
<if test="supplierId != null and supplierId != ''"> and csd.supplier_id = #{supplierId}</if>
<if test="customerId != null and customerId != ''"> and csd.customer_id = #{customerId}</if>
<if test="unit != null and unit != ''"> and csd.unit = #{unit}</if>
<if test="spec != null and spec != ''"> and csd.spec = #{spec}</if>
<if test="scanNum != null and scanNum != ''"> and csd.scan_num = #{scanNum}</if>
<if test="scanNumX != null and scanNumX != ''"> and csd.scan_num_x = #{scanNumX}</if>
<if test="scanNumJ != null and scanNumJ != ''"> and csd.scan_num_j = #{scanNumJ}</if>
<if test="spare1 != null and spare1 != ''"> and csd.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and csd.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and csd.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and csd.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and csd.spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and csd.spare6 = #{spare6}</if>
<if test="stockCheckGuid != null and stockCheckGuid != ''"> and csd.stock_check_guid like concat('%', #{stockCheckGuid}, '%')</if>
<if test="stockCheckId != null and stockCheckId != ''"> and csd.stock_check_id like concat('%', #{stockCheckId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and csd.lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productGuid != null and productGuid != ''"> and csd.product_guid like concat('%', #{productGuid}, '%')</if>
<if test="productId != null and productId != ''"> and csd.product_id like concat('%', #{productId}, '%')</if>
<if test="quantity != null and quantity != ''"> and csd.quantity like concat('%', #{quantity}, '%')</if>
<if test="quantityX != null and quantityX != ''"> and csd.quantity_x like concat('%', #{quantityX}, '%')</if>
<if test="quantityJ != null and quantityJ != ''"> and csd.quantity_j like concat('%', #{quantityJ}, '%')</if>
<if test="price != null and price != ''"> and csd.price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and csd.cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="assignNum != null and assignNum != ''"> and csd.assign_num like concat('%', #{assignNum}, '%')</if>
<if test="assignNumX != null and assignNumX != ''"> and csd.assign_num_x like concat('%', #{assignNumX}, '%')</if>
<if test="assignNumJ != null and assignNumJ != ''"> and csd.assign_num_j like concat('%', #{assignNumJ}, '%')</if>
<if test="printDate != null and printDate != ''"> and csd.print_date like concat('%', #{printDate}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and csd.stock_status like concat('%', #{stockStatus}, '%')</if>
<if test="supplierId != null and supplierId != ''"> and csd.supplier_id like concat('%', #{supplierId}, '%')</if>
<if test="customerId != null and customerId != ''"> and csd.customer_id like concat('%', #{customerId}, '%')</if>
<if test="unit != null and unit != ''"> and csd.unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and csd.spec like concat('%', #{spec}, '%')</if>
<if test="scanNum != null and scanNum != ''"> and csd.scan_num like concat('%', #{scanNum}, '%')</if>
<if test="scanNumX != null and scanNumX != ''"> and csd.scan_num_x like concat('%', #{scanNumX}, '%')</if>
<if test="scanNumJ != null and scanNumJ != ''"> and csd.scan_num_j like concat('%', #{scanNumJ}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and csd.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and csd.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and csd.spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and csd.spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and csd.spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and csd.spare6 like concat('%', #{spare6}, '%')</if>
</where>
</select>
@@ -235,3 +235,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from check_stockin_detail where stock_check_id = #{stockCheckId}
</select>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -59,24 +59,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCheckStockinFinishList" parameterType="CheckStockinFinish" resultMap="CheckStockinFinishResult">
<include refid="selectCheckStockinFinishVo"/>
<where>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id like concat('%', #{stockCheckId}, '%')</if>
<if test="checkType != null and checkType != ''"> and check_type like concat('%', #{checkType}, '%')</if>
<if test="createDate != null and createDate != ''"> and create_date like concat('%', #{createDate}, '%')</if>
<if test="createManId != null and createManId != ''"> and create_man_id like concat('%', #{createManId}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="finishDate != null and finishDate != ''"> and finish_date like concat('%', #{finishDate}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill like concat('%', #{erpBill}, '%')</if>
<if test="stockSource != null and stockSource != ''"> and stock_source like concat('%', #{stockSource}, '%')</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no like concat('%', #{departmentNo}, '%')</if>
<if test="customerNo != null and customerNo != ''"> and customer_no like concat('%', #{customerNo}, '%')</if>
<if test="classNo != null and classNo != ''"> and class_no like concat('%', #{classNo}, '%')</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no like concat('%', #{supplierNo}, '%')</if>
</where>
</select>
@@ -87,24 +87,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCheckStockinList" resultMap="CheckStockinResult">
<include refid="selectCheckStockinVo"/>
<where>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id = #{stockCheckId}</if>
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and csf.warehouse_id = #{warehouseId}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="stockCheckId != null and stockCheckId != ''"> and stock_check_id like concat('%', #{stockCheckId}, '%')</if>
<if test="checkType != null and checkType != ''"> and check_type like concat('%', #{checkType}, '%')</if>
<if test="createDate != null and createDate != ''"> and create_date like concat('%', #{createDate}, '%')</if>
<if test="createManId != null and createManId != ''"> and create_man_id like concat('%', #{createManId}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and csf.warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="finishDate != null and finishDate != ''"> and finish_date like concat('%', #{finishDate}, '%')</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill like concat('%', #{erpBill}, '%')</if>
<if test="stockSource != null and stockSource != ''"> and stock_source like concat('%', #{stockSource}, '%')</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no like concat('%', #{departmentNo}, '%')</if>
<if test="customerNo != null and customerNo != ''"> and customer_no like concat('%', #{customerNo}, '%')</if>
<if test="classNo != null and classNo != ''"> and class_no like concat('%', #{classNo}, '%')</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no like concat('%', #{supplierNo}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
@@ -194,3 +194,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -58,24 +58,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCheckStockinList" parameterType="CheckStockin" resultMap="CheckStockinResult">
<include refid="selectCheckStockinVo"/>
<where>
<if test="stockCheckId != null and stockCheckId != ''"> and cs.stock_check_id = #{stockCheckId}</if>
<if test="checkType != null and checkType != ''"> and cs.check_type = #{checkType}</if>
<if test="createDate != null and createDate != ''"> and cs.create_date = #{createDate}</if>
<if test="createManId != null and createManId != ''"> and cs.create_man_id = #{createManId}</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="finishDate != null and finishDate != ''"> and cs.finish_date = #{finishDate}</if>
<if test="erpBill != null and erpBill != ''"> and cs.erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and cs.stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and cs.department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and cs.customer_no = #{customerNo}</if>
<if test="classNo != null and classNo != ''"> and cs.class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and cs.supplier_no = #{supplierNo}</if>
<if test="spare1 != null and spare1 != ''"> and cs.spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and cs.spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and cs.spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and cs.spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and cs.spare5 = #{spare5}</if>
<if test="stockCheckId != null and stockCheckId != ''"> and cs.stock_check_id like concat('%', #{stockCheckId}, '%')</if>
<if test="checkType != null and checkType != ''"> and cs.check_type like concat('%', #{checkType}, '%')</if>
<if test="createDate != null and createDate != ''"> and cs.create_date like concat('%', #{createDate}, '%')</if>
<if test="createManId != null and createManId != ''"> and cs.create_man_id like concat('%', #{createManId}, '%')</if>
<if test="status != null and status != ''"> and cs.status like concat('%', #{status}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and cs.warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="finishDate != null and finishDate != ''"> and cs.finish_date like concat('%', #{finishDate}, '%')</if>
<if test="erpBill != null and erpBill != ''"> and cs.erp_bill like concat('%', #{erpBill}, '%')</if>
<if test="stockSource != null and stockSource != ''"> and cs.stock_source like concat('%', #{stockSource}, '%')</if>
<if test="departmentNo != null and departmentNo != ''"> and cs.department_no like concat('%', #{departmentNo}, '%')</if>
<if test="customerNo != null and customerNo != ''"> and cs.customer_no like concat('%', #{customerNo}, '%')</if>
<if test="classNo != null and classNo != ''"> and cs.class_no like concat('%', #{classNo}, '%')</if>
<if test="supplierNo != null and supplierNo != ''"> and cs.supplier_no like concat('%', #{supplierNo}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and cs.spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and cs.spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and cs.spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and cs.spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and cs.spare5 like concat('%', #{spare5}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
@@ -183,3 +183,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -27,38 +27,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sendStatus" column="send_status"/>
<result property="sendTime" column="send_time"/>
<result property="msg" column="msg"/>
<result property="companyShortName" column="company_short_name"/>
<result property="accountSetNo" column="account_set_no"/>
</resultMap>
<sql id="selectInStockinBackVo">
select stockin_guid, stockin_id, in_type, create_date, create_man_id, status, warehouse_id,
spare5, spare4, spare3, finish_date, spare2, spare1, erp_bill, stock_source, department_no,
customer_no, class_no, supplier_no,send_status,send_time,msg from in_stockin_back
customer_no, class_no, supplier_no,send_status,send_time,msg,company_short_name,account_set_no from in_stockin_back
</sql>
<select id="selectInStockinBackList" parameterType="InStockinBack" resultMap="InStockinBackResult">
<include refid="selectInStockinBackVo"/>
<where>
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
<if test="inType != null and inType != ''"> and in_type = #{inType}</if>
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill = #{erpBill}</if>
<if test="stockSource != null and stockSource != ''"> and stock_source = #{stockSource}</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
<if test="classNo != null and classNo != ''"> and class_no = #{classNo}</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no = #{supplierNo}</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status = #{sendStatus}</if>
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id like concat('%', #{stockinId}, '%')</if>
<if test="inType != null and inType != ''"> and in_type like concat('%', #{inType}, '%')</if>
<if test="createDate != null and createDate != ''"> and create_date like concat('%', #{createDate}, '%')</if>
<if test="createManId != null and createManId != ''"> and create_man_id like concat('%', #{createManId}, '%')</if>
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="finishDate != null and finishDate != ''"> and finish_date like concat('%', #{finishDate}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="erpBill != null and erpBill != ''"> and erp_bill like concat('%', #{erpBill}, '%')</if>
<if test="stockSource != null and stockSource != ''"> and stock_source like concat('%', #{stockSource}, '%')</if>
<if test="departmentNo != null and departmentNo != ''"> and department_no like concat('%', #{departmentNo}, '%')</if>
<if test="customerNo != null and customerNo != ''"> and customer_no like concat('%', #{customerNo}, '%')</if>
<if test="classNo != null and classNo != ''"> and class_no like concat('%', #{classNo}, '%')</if>
<if test="supplierNo != null and supplierNo != ''"> and supplier_no like concat('%', #{supplierNo}, '%')</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status like concat('%', #{sendStatus}, '%')</if>
<if test="sendTime != null and sendTime != ''"> and send_time like concat('%', #{sendTime}, '%')</if>
<if test="msg != null and msg != ''"> and msg like concat('%', #{msg}, '%')</if>
</where>
</select>
@@ -146,7 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classNo != null">class_no = #{classNo},</if>
<if test="supplierNo != null">supplier_no = #{supplierNo},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="senTime != null">send_time = #{senTime},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockin_guid = #{stockinGuid}
@@ -165,7 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTopInStockin" resultMap="InStockinBackResult">
select top(1) *
from in_stockin_back where status= 0
from in_stockin_back where send_status= 0 and stock_source =1
</select>
</mapper>
</mapper>

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -42,53 +42,95 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sendStatus" column="send_status"/>
<result property="sendTime" column="send_time"/>
<result property="msg" column="msg"/>
<result property="sourceLineId" column="source_line_id"/>
<result property="barCode" column="bar_code"/>
<result property="isBatchManage" column="is_batch_manage"/>
<result property="oldProjectNo" column="old_project_no"/>
</resultMap>
<sql id="selectInStockinDetailBackVo">
select stockin_detail_id, stockin_guid, stockin_id, lot_no, product_guid, product_id, quantity,
quantity_x, quantity_j, price, cargo_no, remark, assign_num, assign_num_x, assign_num_j,
print_date, stock_status, supplier_id, customer_id, unit, spec, spare1, spare2, spare3,
spare4, spare5, spare6, scan_num, scan_num_x, scan_num_j, spare7, spare8, spare9, product_name,send_status,send_time,msg from in_stockin_detail_back
select stockin_detail_id,
stockin_guid,
stockin_id,
lot_no,
product_guid,
product_id,
quantity,
quantity_x,
quantity_j,
price,
cargo_no,
remark,
assign_num,
assign_num_x,
assign_num_j,
print_date,
stock_status,
supplier_id,
customer_id,
unit,
spec,
spare1,
spare2,
spare3,
spare4,
spare5,
spare6,
scan_num,
scan_num_x,
scan_num_j,
spare7,
spare8,
spare9,
product_name,
send_status,
send_time,
msg,
source_line_id,
bar_code,
is_batch_manage,
old_project_no
from in_stockin_detail_back
</sql>
<select id="selectInStockinDetailBackList" parameterType="InStockinDetailBack" resultMap="InStockinDetailBackResult">
<include refid="selectInStockinDetailBackVo"/>
<where>
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid = #{stockinGuid}</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id = #{stockinId}</if>
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
<if test="quantityX != null and quantityX != ''"> and quantity_x = #{quantityX}</if>
<if test="quantityJ != null and quantityJ != ''"> and quantity_j = #{quantityJ}</if>
<if test="price != null and price != ''"> and price = #{price}</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
<if test="assignNum != null and assignNum != ''"> and assign_num = #{assignNum}</if>
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x = #{assignNumX}</if>
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j = #{assignNumJ}</if>
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status = #{stockStatus}</if>
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
<if test="customerId != null and customerId != ''"> and customer_id = #{customerId}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
<if test="scanNum != null and scanNum != ''"> and scan_num = #{scanNum}</if>
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x = #{scanNumX}</if>
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j = #{scanNumJ}</if>
<if test="spare7 != null and spare7 != ''"> and spare7 = #{spare7}</if>
<if test="spare8 != null and spare8 != ''"> and spare8 = #{spare8}</if>
<if test="spare9 != null and spare9 != ''"> and spare9 = #{spare9}</if>
<if test="stockinGuid != null and stockinGuid != ''"> and stockin_guid like concat('%', #{stockinGuid}, '%')</if>
<if test="stockinId != null and stockinId != ''"> and stockin_id like concat('%', #{stockinId}, '%')</if>
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
<if test="productGuid != null and productGuid != ''"> and product_guid like concat('%', #{productGuid}, '%')</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity like concat('%', #{quantity}, '%')</if>
<if test="quantityX != null and quantityX != ''"> and quantity_x like concat('%', #{quantityX}, '%')</if>
<if test="quantityJ != null and quantityJ != ''"> and quantity_j like concat('%', #{quantityJ}, '%')</if>
<if test="price != null and price != ''"> and price like concat('%', #{price}, '%')</if>
<if test="cargoNo != null and cargoNo != ''"> and cargo_no like concat('%', #{cargoNo}, '%')</if>
<if test="assignNum != null and assignNum != ''"> and assign_num like concat('%', #{assignNum}, '%')</if>
<if test="assignNumX != null and assignNumX != ''"> and assign_num_x like concat('%', #{assignNumX}, '%')</if>
<if test="assignNumJ != null and assignNumJ != ''"> and assign_num_j like concat('%', #{assignNumJ}, '%')</if>
<if test="printDate != null and printDate != ''"> and print_date like concat('%', #{printDate}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status like concat('%', #{stockStatus}, '%')</if>
<if test="supplierId != null and supplierId != ''"> and supplier_id like concat('%', #{supplierId}, '%')</if>
<if test="customerId != null and customerId != ''"> and customer_id like concat('%', #{customerId}, '%')</if>
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 like concat('%', #{spare1}, '%')</if>
<if test="spare2 != null and spare2 != ''"> and spare2 like concat('%', #{spare2}, '%')</if>
<if test="spare3 != null and spare3 != ''"> and spare3 like concat('%', #{spare3}, '%')</if>
<if test="spare4 != null and spare4 != ''"> and spare4 like concat('%', #{spare4}, '%')</if>
<if test="spare5 != null and spare5 != ''"> and spare5 like concat('%', #{spare5}, '%')</if>
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="scanNum != null and scanNum != ''"> and scan_num like concat('%', #{scanNum}, '%')</if>
<if test="scanNumX != null and scanNumX != ''"> and scan_num_x like concat('%', #{scanNumX}, '%')</if>
<if test="scanNumJ != null and scanNumJ != ''"> and scan_num_j like concat('%', #{scanNumJ}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="spare9 != null and spare9 != ''"> and spare9 like concat('%', #{spare9}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status = #{sendStatus}</if>
<if test="sendTime != null and sendTime != ''"> and send_time = #{sendTime}</if>
<if test="msg != null and msg != ''"> and msg = #{msg}</if>
<if test="sendStatus != null and sendStatus != ''"> and send_status like concat('%', #{sendStatus}, '%')</if>
<if test="sendTime != null and sendTime != ''"> and send_time like concat('%', #{sendTime}, '%')</if>
<if test="msg != null and msg != ''"> and msg like concat('%', #{msg}, '%')</if>
</where>
</select>
@@ -189,7 +231,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update in_stockin_detail_back
<trim prefix="SET" suffixOverrides=",">
<if test="stockinGuid != null and stockinGuid != ''">stockin_guid = #{stockinGuid},</if>
<if test="stockinId != null and stockinId != ''">stockin_id = #{stockinId},</if>
<if test="lotNo != null">lot_no = #{lotNo},</if>
<if test="productGuid != null">product_guid = #{productGuid},</if>
<if test="productId != null and productId != ''">product_id = #{productId},</if>
@@ -222,10 +264,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare9 != null">spare9 = #{spare9},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="sendStatus != null">send_status = #{sendStatus},</if>
<if test="senTime != null">send_time = #{senTime},</if>
<if test="sendTime != null">send_time = #{sendTime},</if>
<if test="msg != null">msg = #{msg},</if>
</trim>
where stockin_detail_id = #{stockinDetailId}
where stockin_id = #{stockinId}
</update>
<delete id="deleteInStockinDetailBackByStockinDetailId" parameterType="String">
@@ -238,4 +280,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{stockinDetailId}
</foreach>
</delete>
</mapper>
<insert id="insertInStockInDetailBackFinish" parameterType="java.util.List">
INSERT INTO in_stockin_detail_back_finish
<foreach collection="list" item="item" separator="UNION ALL">
SELECT * FROM in_stockin_detail_back
WHERE stockin_detail_id = #{item.stockinDetailId}
</foreach>
</insert>
<delete id="deleteInStockInDetailList">
DELETE FROM in_stockin_detail_back
WHERE stockin_detail_id IN
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item.stockinDetailId}
</foreach>
</delete>
</mapper>

Some files were not shown because too many files have changed in this diff Show More