Initial commit

This commit is contained in:
zgw
2026-01-20 15:41:23 +08:00
commit b616cb490c
36 changed files with 23438 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package com.project.joggle;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
@SpringBootApplication
@EnableScheduling
public class JoggleApplication implements SchedulingConfigurer {
public static void main(String[] args) {
SpringApplication.run(JoggleApplication.class, args);
}
@Override
public void configureTasks(ScheduledTaskRegistrar registrar) {
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
scheduler.setPoolSize(3);
scheduler.setThreadNamePrefix("scheduled-");
scheduler.initialize();
registrar.setTaskScheduler(scheduler);
}
}

View File

@@ -0,0 +1,39 @@
package com.project.joggle.controller;
import cn.hutool.json.JSONUtil;
import com.project.joggle.domain.Result;
import com.project.joggle.service.PortService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/port")
public class PortController {
@Autowired
PortService portService;
/**
* 登录获取Token
*/
@RequestMapping("/getToken")
public void getToken() {
portService.getToken();
}
/**
* 入库计划保存API
*
* @return
*/
@RequestMapping("/saveInStockin")
@ResponseBody
public Result saveInStockin() {
Result result = portService.saveInStockin();
return result;
}
}

View File

@@ -0,0 +1,84 @@
package com.project.joggle.domain;
public class InterfaceLog {
private String logId;
private String interfaceName;
private String requestTime;
private String requestData;
private String responseData;
private String businessId;
private String flag;
public String getLogId() {
return logId;
}
public void setLogId(String logId) {
this.logId = logId;
}
public String getInterfaceName() {
return interfaceName;
}
public void setInterfaceName(String interfaceName) {
this.interfaceName = interfaceName;
}
public String getRequestTime() {
return requestTime;
}
public void setRequestTime(String requestTime) {
this.requestTime = requestTime;
}
public String getRequestData() {
return requestData;
}
public void setRequestData(String requestData) {
this.requestData = requestData;
}
public String getResponseData() {
return responseData;
}
public void setResponseData(String responseData) {
this.responseData = responseData;
}
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
@Override
public String toString() {
return "InterfaceLog{" +
"logId='" + logId + '\'' +
", interfaceName='" + interfaceName + '\'' +
", requestTime='" + requestTime + '\'' +
", requestData='" + requestData + '\'' +
", responseData='" + responseData + '\'' +
", businessId='" + businessId + '\'' +
", flag='" + flag + '\'' +
'}';
}
}

View File

@@ -0,0 +1,54 @@
package com.project.joggle.domain;
public class Result {
private Integer code;
private Boolean success;
private String message;
private Boolean data;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Boolean getData() {
return data;
}
public void setData(Boolean data) {
this.data = data;
}
@Override
public String toString() {
return "Result{" +
"code=" + code +
", success=" + success +
", message='" + message + '\'' +
", data=" + data +
'}';
}
}

View File

@@ -0,0 +1,67 @@
package com.project.joggle.domain;
public class TokenBody {
private String client_id;
private String client_secret;
private String username;
private String accountId;
private String language;
private String nonce;
private String timestamp;
public String getClient_id() {
return client_id;
}
public void setClient_id(String client_id) {
this.client_id = client_id;
}
public String getClient_secret() {
return client_secret;
}
public void setClient_secret(String client_secret) {
this.client_secret = client_secret;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
public String getNonce() {
return nonce;
}
public void setNonce(String nonce) {
this.nonce = nonce;
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
}

View File

@@ -0,0 +1,18 @@
package com.project.joggle.mapper;
import com.project.joggle.domain.ToKwmsAgjust;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author Jackie
* @description 针对表【TO_KWMS_AGJUST(库存调整单主表)】的数据库操作Mapper
* @createDate 2026-01-20 15:14:13
* @Entity com.project.joggle.domain.ToKwmsAgjust
*/
public interface ToKwmsAgjustMapper extends BaseMapper<ToKwmsAgjust> {
}

View File

@@ -0,0 +1,11 @@
package com.project.joggle.service;
import com.project.joggle.domain.Result;
public interface PortService {
void getToken();
Result saveInStockin();
}

View File

@@ -0,0 +1,145 @@
package com.project.joggle.service;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.DigestUtil;
import cn.hutool.crypto.digest.MD5;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.project.joggle.domain.*;
import com.project.joggle.mapper.*;
import com.project.joggle.utils.HttpUtils;
import com.project.joggle.utils.UtilId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.rmi.CORBA.Util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.OffsetDateTime;
import java.util.*;
@Service
public class PortServiceImpl implements PortService {
@Autowired
private InterfaceLogMapper interfaceLogMapper;
@Autowired
private RelationshipRestructurMapper relationshipRestructurMapper;
static String tokenTime = "";
static int expiring = 0;
static String token = "";
private static final String kWmsUrl = "https://localhost:port";
private static final String getToken = "/kapi/oauth2/getToken";
public synchronized void getToken() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (!"".equals(tokenTime) && expiring != 0) {
//计算token失效时间
try {
Date expiringTime = sdf.parse(tokenTime);
long expiringTimes = expiringTime.getTime() + expiring;
long now = System.currentTimeMillis();
if(now < expiringTimes) {
return;
}
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
String url = kWmsUrl + getToken;
TokenBody body = new TokenBody();
body.setClient_id("ZSJRLKWMSJK");
body.setClient_secret("ZSJR@@xxhqwe3245");
body.setUsername("jkyh");
body.setAccountId("2357576281186374656");
body.setLanguage("zh_CN");
body.setNonce(UtilId.uuids());
tokenTime = sdf.format(new Date());
body.setTimestamp(tokenTime);
String responseJson = HttpUtils.sendPost(url, JSONUtil.toJsonStr(body), "application/json");
JSONObject obj = new JSONObject(responseJson);
if ("0".equals(obj.getStr("errorCode"))) {
token = obj.getJSONObject("data").getStr("access_token");
expiring = obj.getJSONObject("data").getInt("expires_in");
}
insertInterfaceLog("金蝶WMS获取token", JSONUtil.toJsonStr(body), responseJson, "", obj.getStr("errorCode").toString());
}
@Override
public Result saveInStockin() {
}
@Override
public void reorganizeRelationShip() {
RelationshipRestructur relationshipRestructur = relationshipRestructurMapper.selectTopRelationshipRestructur();
if (relationshipRestructur != null) {
List<RelationshipRestructur> relationshipRestructurList = relationshipRestructurMapper.selectRelationshipRestructurByParentCode(relationshipRestructur.getParentCode());
RelationRestructurSend relationRestructurSend = new RelationRestructurSend();
List<TrayCodes> trayCodesList = new ArrayList<>();
for (RelationshipRestructur relationshipRestructurOne : relationshipRestructurList) {
TrayCodes trayCodes = new TrayCodes();
trayCodes.setParentCode(relationshipRestructurOne.getParentCode());
trayCodes.setCurCode(relationshipRestructurOne.getCurCode());
trayCodesList.add(trayCodes);
}
relationRestructurSend.setWarehouse("FLRD");
relationRestructurSend.setTraceCodes(trayCodesList);
String jsonStr = JSONUtil.toJsonStr(relationRestructurSend);
//发送数据
getToken();
String doc_id = "8303C5AC-4285-4D7C-BEDA-9026115840BE";
// 目标URL
String url = getUrl("000006", "JieRou");
HttpRequest request = HttpUtil.createPost(url);
request.header("doc_id", doc_id);
request.header("Token", token);
request.body(jsonStr);
HttpResponse response = request.execute();
JSONObject jsonObject = new JSONObject(response.body());
if (jsonObject.getInt("code") == 0) {
relationshipRestructur.setStatus("1");
} else if (jsonObject.getInt("code") == 1) {
if (relationshipRestructur.getErrorcount() == null) {
relationshipRestructur.setErrorcount(1);
} else {
relationshipRestructur.setErrorcount(relationshipRestructur.getErrorcount() + 1);
}
relationshipRestructur.setStatus("2");
} else if (jsonObject.getInt("code") == 2) {
relationshipRestructur.setStatus("3");
}
relationshipRestructurMapper.updateRelationshipRestructur(relationshipRestructur);
insertInterfaceLog("关联关系重组", jsonStr, response.body(), relationshipRestructur.getParentCode(), jsonObject.getInt("code").toString());
}
}
public void insertInterfaceLog(String name, String requsetData, String responseDate, String bussinessId, String flag) {
InterfaceLog interfaceLog = new InterfaceLog();
interfaceLog.setLogId(UUID.randomUUID().toString());
interfaceLog.setInterfaceName(name);
interfaceLog.setRequestTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
interfaceLog.setRequestData(requsetData);
interfaceLog.setResponseData(responseDate);
interfaceLog.setBusinessId(bussinessId);
interfaceLog.setFlag(flag);
interfaceLogMapper.insertInterfaceLog(interfaceLog);
}
}

View File

@@ -0,0 +1,13 @@
package com.project.joggle.service;
import com.project.joggle.domain.ToKwmsAgjust;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author Jackie
* @description 针对表【TO_KWMS_AGJUST(库存调整单主表)】的数据库操作Service
* @createDate 2026-01-20 15:14:13
*/
public interface ToKwmsAgjustService extends IService<ToKwmsAgjust> {
}

View File

@@ -0,0 +1,22 @@
package com.project.joggle.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.joggle.domain.ToKwmsAgjust;
import com.project.joggle.service.ToKwmsAgjustService;
import com.project.joggle.mapper.ToKwmsAgjustMapper;
import org.springframework.stereotype.Service;
/**
* @author Jackie
* @description 针对表【TO_KWMS_AGJUST(库存调整单主表)】的数据库操作Service实现
* @createDate 2026-01-20 15:14:13
*/
@Service
public class ToKwmsAgjustServiceImpl extends ServiceImpl<ToKwmsAgjustMapper, ToKwmsAgjust>
implements ToKwmsAgjustService{
}

View File

@@ -0,0 +1,89 @@
package com.project.joggle.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import javax.net.ssl.*;
import java.io.*;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.StandardCharsets;
import java.security.cert.X509Certificate;
/**
* 通用http发送方法
*
* @author ruoyi
*/
public class HttpUtils
{
private static final Logger log = LoggerFactory.getLogger(HttpUtils.class);
public static String sendPost(String url, String param, String contentType)
{
PrintWriter out = null;
BufferedReader in = null;
StringBuilder result = new StringBuilder();
try
{
log.info("sendPost - {}", url);
URL realUrl = new URL(url);
URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)");
conn.setRequestProperty("Accept-Charset", "utf-8");
conn.setRequestProperty("Content-Type", contentType);
conn.setDoOutput(true);
conn.setDoInput(true);
out = new PrintWriter(conn.getOutputStream());
out.print(param);
out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
String line;
while ((line = in.readLine()) != null)
{
result.append(line);
}
log.info("recv - {}", result);
}
catch (ConnectException e)
{
log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e);
}
catch (SocketTimeoutException e)
{
log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e);
}
catch (IOException e)
{
log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e);
}
catch (Exception e)
{
log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e);
}
finally
{
try
{
if (out != null)
{
out.close();
}
if (in != null)
{
in.close();
}
}
catch (IOException ex)
{
log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
}
}
return result.toString();
}
}

View File

@@ -0,0 +1,11 @@
package com.project.joggle.utils;
import java.util.UUID;
public class UtilId {
public static String uuids() {
UUID uuid = UUID.randomUUID();
String a = uuid.toString().replace("-", "").toUpperCase();
return a;
}
}

View File

@@ -0,0 +1,17 @@
# 应用服务 WEB 访问端口
server.port=8090
# DataSource configuration for Oracle
spring.datasource.url=jdbc:oracle:thin:@172.16.2.170:1521:orcl
spring.datasource.username=ZSJR
spring.datasource.password=123456
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
# MyBatis configuration
mybatis.type-aliases-package=com.project.joggle.domain
mybatis.mapper-locations=classpath*:mapper/*Mapper.xml
# MyBatis SQL log configuration
logging.level.com.project.joggle.mapper=debug
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property name="log.path" value="./logs" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
<!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-info.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-error.log</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>ERROR</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 用户访问日志输出 -->
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-user.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 按天回滚 daily -->
<fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统模块日志级别控制 -->
<logger name="com.project.joggle" level="info" />
<!-- Spring日志级别控制 -->
<logger name="org.springframework" level="warn" />
<root level="info">
<appender-ref ref="console" />
</root>
<!--系统操作日志-->
<root level="info">
<appender-ref ref="file_info" />
<appender-ref ref="file_error" />
</root>
<!--系统用户操作日志-->
<logger name="sys-user" level="info">
<appender-ref ref="sys-user"/>
</logger>
</configuration>

View File

@@ -0,0 +1,224 @@
<?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">
<mapper namespace="com.project.joggle.mapper.InPtsProductionDetailMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.InPtsProductionDetail">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="action" column="action" jdbcType="INTEGER"/>
<result property="parentTraceCode" column="parent_trace_code" jdbcType="VARCHAR"/>
<result property="parentAppendCode" column="parent_append_code" jdbcType="VARCHAR"/>
<result property="productNo" column="product_no" jdbcType="VARCHAR"/>
<result property="productName" column="product_name" jdbcType="VARCHAR"/>
<result property="productSpec" column="product_spec" jdbcType="VARCHAR"/>
<result property="packagingRatioName" column="packaging_ratio_name" jdbcType="VARCHAR"/>
<result property="productionDate" column="production_date" jdbcType="VARCHAR"/>
<result property="productionBatch" column="production_batch" jdbcType="VARCHAR"/>
<result property="expirationDate" column="expiration_date" jdbcType="VARCHAR"/>
<result property="sourceNo" column="source_no" jdbcType="VARCHAR"/>
<result property="taskNo" column="task_no" jdbcType="VARCHAR"/>
<result property="lineNo" column="line_no" jdbcType="VARCHAR"/>
<result property="teamGroupNo" column="team_group_no" jdbcType="VARCHAR"/>
<result property="machineNo" column="machine_no" jdbcType="VARCHAR"/>
<result property="fuzzy" column="fuzzy" jdbcType="INTEGER"/>
<result property="curCode" column="cur_code" jdbcType="VARCHAR"/>
<result property="scanNo" column="scan_no" jdbcType="INTEGER"/>
<result property="layerNo" column="layer_no" jdbcType="INTEGER"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="inType" column="in_type" jdbcType="VARCHAR"/>
<result property="errorcount" column="errorcount" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id, action, parent_trace_code,parent_append_code,
product_no, product_name, product_spec,
packaging_ratio_name, production_date, production_batch,
expiration_date, source_no, task_no,
line_no, team_group_no, machine_no,
fuzzy, cur_code, scan_no,
layer_no, status,in_type,errorcount
</sql>
<select id="selectInptsProductionDetailList" parameterType="InPtsProductionDetail" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM in_pts_production_detail
<where>
<if test="id != null and id != ''">AND id = #{id}</if>
<if test="action != null and action != ''">AND action = #{action}</if>
<if test="parentTraceCode != null and parentTraceCode != ''">AND parent_trace_code = #{parentTraceCode}</if>
<if test="parentAppendCode != null and parentAppendCode != ''">AND parent_append_code = #{parentAppendCode}</if>
<if test="productNo != null and productNo != ''">AND product_no = #{productNo}</if>
<if test="productName != null and productName != ''">AND product_name = #{productName}</if>
<if test="productSpec != null and productSpec != ''">AND product_spec = #{productSpec}</if>
<if test="packagingRatioName != null and packagingRatioName != ''">AND packaging_ratio_name = #{packagingRatioName}</if>
<if test="productionDate != null">AND production_date = #{productionDate}</if>
<if test="productionBatch != null and productionBatch != ''">AND production_batch = #{productionBatch}</if>
<if test="expirationDate != null">AND expiration_date = #{expirationDate}</if>
<if test="sourceNo != null and sourceNo != ''">AND source_no = #{sourceNo}</if>
<if test="taskNo != null and taskNo != ''">AND task_no = #{taskNo}</if>
<if test="lineNo != null and lineNo != ''">AND line_no = #{lineNo}</if>
<if test="teamGroupNo != null and teamGroupNo != ''">AND team_group_no = #{teamGroupNo}</if>
<if test="machineNo != null and machineNo != ''">AND machine_no = #{machineNo}</if>
<if test="fuzzy != null">AND fuzzy = #{fuzzy}</if>
<if test="status != null and status != ''">AND status = #{status}</if>
<if test="inType != null and inType != ''">AND in_type = #{inType}</if>
</where>
</select>
<insert id="insertInPtsProductionDetail" parameterType="com.project.joggle.domain.InPtsProductionDetail">
INSERT INTO in_pts_production_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="action != null "> action,</if>
<if test="parentTraceCode != null and parentTraceCode != ''">parent_trace_code,</if>
<if test="parentAppendCode != null and parentAppendCode != ''">parent_append_code,</if>
<if test="productNo != null and productNo != ''">product_no,</if>
<if test="productName != null and productName != ''">product_name,</if>
<if test="productSpec != null and productSpec != ''">product_spec,</if>
<if test="packagingRatioName != null and packagingRatioName != ''">packaging_ratio_name,</if>
<if test="productionDate != null">production_date,</if>
<if test="productionBatch != null and productionBatch != ''">production_batch,</if>
<if test="expirationDate != null">expiration_date,</if>
<if test="sourceNo != null and sourceNo != ''">source_no,</if>
<if test="taskNo != null and taskNo != ''">task_no,</if>
<if test="lineNo != null and lineNo != ''">line_no,</if>
<if test="teamGroupNo != null and teamGroupNo != ''">team_group_no,</if>
<if test="machineNo != null and machineNo != ''">machine_no,</if>
<if test="fuzzy != null">fuzzy,</if>
<if test="curCode != null and curCode != ''">cur_code,</if>
<if test="scanNo != null">scan_no,</if>
<if test="layerNo != null">layer_no,</if>
<if test="status != null and status != ''">status,</if>
<if test="inType != null and inType != ''">in_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="action != null ">#{action},</if>
<if test="parentTraceCode != null and parentTraceCode != ''">#{parentTraceCode},</if>
<if test="parentAppendCode != null and parentAppendCode != ''">#{parentAppendCode},</if>
<if test="productNo != null and productNo != ''">#{productNo},</if>
<if test="productName != null and productName != ''">#{productName},</if>
<if test="productSpec != null and productSpec != ''">#{productSpec},</if>
<if test="packagingRatioName != null and packagingRatioName != ''">#{packagingRatioName},</if>
<if test="productionDate != null">#{productionDate},</if>
<if test="productionBatch != null and productionBatch != ''">#{productionBatch},</if>
<if test="expirationDate != null">#{expirationDate},</if>
<if test="sourceNo != null and sourceNo != ''">#{sourceNo},</if>
<if test="taskNo != null and taskNo != ''">#{taskNo},</if>
<if test="lineNo != null and lineNo != ''">#{lineNo},</if>
<if test="teamGroupNo != null and teamGroupNo != ''">#{teamGroupNo},</if>
<if test="machineNo != null and machineNo != ''">#{machineNo},</if>
<if test="fuzzy != null">#{fuzzy},</if>
<if test="curCode != null and curCode != ''">#{curCode},</if>
<if test="scanNo != null">#{scanNo},</if>
<if test="layerNo != null">#{layerNo},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="inType != null and inType != ''">#{inType},</if>
</trim>
</insert>
<update id="updateInPtsProductionDetail" parameterType="com.project.joggle.domain.InPtsProductionDetail">
UPDATE in_pts_production_detail
<set>
<if test="action != null and action != ''">action = #{action},</if>
<if test="parentTraceCode != null and parentTraceCode != ''">parent_trace_code = #{parentTraceCode},</if>
<if test="parentAppendCode != null and parentAppendCode != ''">parent_append_code = #{parentAppendCode},</if>
<if test="productNo != null and productNo != ''">product_no = #{productNo},</if>
<if test="productName != null and productName != ''">product_name = #{productName},</if>
<if test="productSpec != null and productSpec != ''">product_spec = #{productSpec},</if>
<if test="packagingRatioName != null and packagingRatioName != ''">packaging_ratio_name = #{packagingRatioName},</if>
<if test="productionDate != null">production_date = #{productionDate},</if>
<if test="productionBatch != null and productionBatch != ''">production_batch = #{productionBatch},</if>
<if test="expirationDate != null">expiration_date = #{expirationDate},</if>
<if test="sourceNo != null and sourceNo != ''">source_no = #{sourceNo},</if>
<if test="taskNo != null and taskNo != ''">task_no = #{taskNo},</if>
<if test="lineNo != null and lineNo != ''">line_no = #{lineNo},</if>
<if test="teamGroupNo != null and teamGroupNo != ''">team_group_no = #{teamGroupNo},</if>
<if test="machineNo != null and machineNo != ''">machine_no = #{machineNo},</if>
<if test="fuzzy != null">fuzzy = #{fuzzy},</if>
<if test="curCode != null and curCode != ''">cur_code = #{curCode},</if>
<if test="scanNo != null">scan_no = #{scanNo},</if>
<if test="layerNo != null">layer_no = #{layerNo},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="inType != null and inType != ''">in_type = #{inType},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatusByParentAppendCode" parameterType="string">
UPDATE in_pts_production_detail
SET status = #{status}
WHERE parent_append_code = #{parentAppendCode} and status = '0'
</update>
<select id="selectInPtsProductionDetailById" resultMap="BaseResultMap" parameterType="com.project.joggle.domain.InPtsProductionDetail">
SELECT <include refid="Base_Column_List"/>
FROM in_pts_production_detail
WHERE id = #{id}
</select>
<delete id="deleteInPtsProductionDetail" parameterType="string">
DELETE FROM in_pts_production_detail
WHERE id = #{id}
</delete>
<select id="selectInptsProductionDetailByParentAppendCode" parameterType="string" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM in_pts_production_detail
WHERE parent_append_code = #{parentAppendCode}
and status = '0'
</select>
<select id="selectTopInptsProductionDetail" resultMap="BaseResultMap">
SELECT * FROM (
SELECT <include refid="Base_Column_List"/>
FROM in_pts_production_detail
WHERE status in (2,4)
and in_type in (1,4)
and (errorcount is null or errorcount &lt;3)
order by production_date asc
) WHERE ROWNUM = 1
</select>
<select id="selectInptsProductionDetailBySourceNo" parameterType="string" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM in_pts_production_detail
WHERE source_no = #{sourceNo}
and status in (2,4)
and in_type =4
</select>
<select id="selectInPtsProductionDetailByAppendCodeAndStatus" parameterType="string" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
FROM in_pts_production_detail
WHERE parent_append_code = #{parentAppendCode}
and status in (2,4)
and in_type =4
</select>
<update id="updateInPtsProductionDetailByParentAppendCode" parameterType="string">
UPDATE in_pts_production_detail
<set>
<if test="status != null and status != ''">
status = #{status}
</if>
<if test="errorcount !=null and errorcount != ''">
errorcount= #{errorcount}
</if>
</set>
WHERE parent_append_code = #{parentAppendCode}
and status='2'
</update>
<update id="updateInPtsProductionDetailByOrderNo" parameterType="string">
UPDATE in_pts_production_detail
SET status = #{status}
WHERE parent_append_code = #{parentAppendCode}
and status > 2
</update>
</mapper>

View File

@@ -0,0 +1,49 @@
<?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">
<mapper namespace="com.project.joggle.mapper.InStockinMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.InStockin">
<result property="stockinId" column="STOCKIN_ID" jdbcType="VARCHAR"/>
<result property="inType" column="IN_TYPE" jdbcType="VARCHAR"/>
<result property="createDate" column="CREATE_DATE" jdbcType="TIMESTAMP"/>
<result property="supplierId" column="SUPPLIER_ID" jdbcType="VARCHAR"/>
<result property="createManId" column="CREATE_MAN_ID" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="warehouseId" column="WAREHOUSE_ID" jdbcType="VARCHAR"/>
<result property="classNowId" column="CLASS_NOW_ID" jdbcType="VARCHAR"/>
<result property="stockinGuid" column="STOCKIN_GUID" jdbcType="VARCHAR"/>
<result property="stockinSource" column="STOCKIN_SOURCE" jdbcType="VARCHAR"/>
<result property="lineId" column="LINE_ID" jdbcType="VARCHAR"/>
<result property="fid" column="FID" jdbcType="VARCHAR"/>
<result property="supplierName" column="SUPPLIER_NAME" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
STOCKIN_ID,IN_TYPE,CREATE_DATE,
SUPPLIER_ID,CREATE_MAN_ID,STATUS,
WAREHOUSE_ID,CLASS_NOW_ID,STOCKIN_GUID,
STOCKIN_SOURCE,LINE_ID,FID
</sql>
<select id="selectInStockinByStockinId" resultMap="BaseResultMap" parameterType="string">
select
i.STOCKIN_ID,i.IN_TYPE,i.CREATE_DATE,
i.SUPPLIER_ID,i.CREATE_MAN_ID,i.STATUS,
i.WAREHOUSE_ID,i.CLASS_NOW_ID,i.STOCKIN_GUID,
i.STOCKIN_SOURCE,i.LINE_ID,i.FID,b.SUPPLIER_NAME
from IN_STOCKIN i left join BAS_SUPPLIER b on i.SUPPLIER_ID = b.SUPPLIER_NO
where STOCKIN_ID = #{stockinId}
</select>
<select id="selectInstockinFinishByStockinId" resultMap="BaseResultMap" parameterType="string">
select
i.STOCKIN_ID,i.IN_TYPE,i.CREATE_DATE,
i.SUPPLIER_ID,i.CREATE_MAN_ID,i.STATUS,
i.WAREHOUSE_ID,i.CLASS_NOW_ID,i.STOCKIN_GUID,
i.STOCKIN_SOURCE,i.LINE_ID,i.FID,b.SUPPLIER_NAME
from IN_STOCKIN_FINISH i left join BAS_SUPPLIER b on i.SUPPLIER_ID = b.SUPPLIER_NO
where STOCKIN_ID = #{stockinId}
</select>
</mapper>

View File

@@ -0,0 +1,93 @@
<?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">
<mapper namespace="com.project.joggle.mapper.InterfaceLogMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.InterfaceLog">
<id property="logId" column="LOG_ID" jdbcType="VARCHAR"/>
<result property="interfaceName" column="INTERFACE_NAME" jdbcType="VARCHAR"/>
<result property="requestTime" column="REQUEST_TIME" jdbcType="VARCHAR"/>
<result property="requestData" column="REQUEST_DATA" jdbcType="VARCHAR"/>
<result property="responseData" column="RESPONSE_DATA" jdbcType="VARCHAR"/>
<result property="businessId" column="BUSINESS_ID" jdbcType="VARCHAR"/>
<result property="flag" column="FLAG" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
LOG_ID,INTERFACE_NAME,REQUEST_TIME,
REQUEST_DATA,RESPONSE_DATA,
BUSINESS_ID,
FLAG
</sql>
<insert id="insertInterfaceLog" parameterType="com.project.joggle.domain.InterfaceLog">
INSERT INTO INTERFACE_LOG
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="logId != null">LOG_ID,</if>
<if test="interfaceName != null">INTERFACE_NAME,</if>
<if test="requestTime != null">REQUEST_TIME,</if>
<if test="requestData != null">REQUEST_DATA,</if>
<if test="responseData != null">RESPONSE_DATA,</if>
<if test="businessId != null">BUSINESS_ID,</if>
<if test="flag != null">FLAG,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="logId != null">#{logId},</if>
<if test="interfaceName != null">#{interfaceName},</if>
<if test="requestTime != null">#{requestTime},</if>
<if test="requestData != null">#{requestData},</if>
<if test="responseData != null">#{responseData},</if>
<if test="businessId != null">#{businessId},</if>
<if test="flag != null">#{flag},</if>
</trim>
</insert>
<delete id="deleteInterfaceLog">
DELETE FROM INTERFACE_LOG
WHERE LOG_ID = #{logId}
</delete>
<update id="updateInterfaceLog" parameterType="com.project.joggle.domain.InterfaceLog">
UPDATE INTERFACE_LOG
<set>
<if test="interfaceName != null">INTERFACE_NAME = #{interfaceName},</if>
<if test="requestTime != null">REQUEST_TIME = #{requestTime},</if>
<if test="requestData != null">REQUEST_DATA = #{requestData},</if>
<if test="responseData != null">RESPONSE_DATA = #{responseData},</if>
<if test="businessId != null">BUSINESS_ID = #{businessId},</if>
<if test="flag != null">FLAG = #{flag},</if>
</set>
WHERE LOG_ID = #{logId}
</update>
<select id="selectInterfaceLogById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM INTERFACE_LOG
WHERE LOG_ID = #{logId}
</select>
<select id="selectInterfaceLogList" parameterType="com.project.joggle.domain.InterfaceLog" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM INTERFACE_LOG
<where>
<if test="logId != null">AND LOG_ID = #{logId}</if>
<if test="interfaceName != null">AND INTERFACE_NAME = #{interfaceName}</if>
<if test="requestTime != null">AND REQUEST_TIME = #{requestTime}</if>
<if test="businessId != null">AND BUSINESS_ID = #{businessId}</if>
<if test="flag != null">AND FLAG = #{flag}</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,209 @@
<?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">
<mapper namespace="com.project.joggle.mapper.MydoJobMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.MydoJob">
<result property="jobId" column="JOB_ID" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="onLineType" column="ON_LINE_TYPE" jdbcType="VARCHAR"/>
<result property="taskNo" column="TASK_NO" jdbcType="VARCHAR"/>
<result property="supplierId" column="SUPPLIER_ID" jdbcType="VARCHAR"/>
<result property="customerId" column="CUSTOMER_ID" jdbcType="VARCHAR"/>
<result property="trayCode" column="TRAY_CODE" jdbcType="VARCHAR"/>
<result property="roadwayId" column="ROADWAY_ID" jdbcType="VARCHAR"/>
<result property="cargoSpaceId" column="CARGO_SPACE_ID" jdbcType="VARCHAR"/>
<result property="lineId" column="LINE_ID" jdbcType="VARCHAR"/>
<result property="workshopId" column="WORKSHOP_ID" jdbcType="VARCHAR"/>
<result property="entranceId" column="ENTRANCE_ID" jdbcType="VARCHAR"/>
<result property="exitId" column="EXIT_ID" jdbcType="VARCHAR"/>
<result property="priority" column="PRIORITY" jdbcType="DECIMAL"/>
<result property="inOrOut" column="IN_OR_OUT" jdbcType="VARCHAR"/>
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
<result property="startTime" column="START_TIME" jdbcType="TIMESTAMP"/>
<result property="finishTime" column="FINISH_TIME" jdbcType="TIMESTAMP"/>
<result property="classNowName" column="CLASS_NOW_NAME" jdbcType="VARCHAR"/>
<result property="classWorkshopName" column="CLASS_WORKSHOP_NAME" jdbcType="VARCHAR"/>
<result property="warehouseId" column="WAREHOUSE_ID" jdbcType="VARCHAR"/>
<result property="targetRoadwayId" column="TARGET_ROADWAY_ID" jdbcType="VARCHAR"/>
<result property="targetCargoSpaceId" column="TARGET_CARGO_SPACE_ID" jdbcType="VARCHAR"/>
<result property="executionPhase" column="EXECUTION_PHASE" jdbcType="VARCHAR"/>
<result property="classgroupNumber" column="CLASSGROUP_NUMBER" jdbcType="VARCHAR"/>
<result property="classWorkshopDateTime" column="CLASS_WORKSHOP_DATE_TIME" jdbcType="VARCHAR"/>
<result property="classId" column="CLASS_ID" jdbcType="VARCHAR"/>
<result property="classNowDateTime" column="CLASS_NOW_DATE_TIME" jdbcType="VARCHAR"/>
<result property="carNumber" column="CAR_NUMBER" jdbcType="VARCHAR"/>
<result property="faultFlag" column="FAULT_FLAG" jdbcType="VARCHAR"/>
<result property="outId" column="OUT_ID" jdbcType="DECIMAL"/>
<result property="relatedId" column="RELATED_ID" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
JOB_ID,STATUS,ON_LINE_TYPE,
TASK_NO,SUPPLIER_ID,CUSTOMER_ID,
TRAY_CODE,ROADWAY_ID,CARGO_SPACE_ID,
LINE_ID,WORKSHOP_ID,ENTRANCE_ID,
EXIT_ID,PRIORITY,IN_OR_OUT,
CREATE_TIME,START_TIME,FINISH_TIME,
CLASS_NOW_NAME,CLASS_WORKSHOP_NAME,WAREHOUSE_ID,
TARGET_ROADWAY_ID,TARGET_CARGO_SPACE_ID,EXECUTION_PHASE,
CLASSGROUP_NUMBER,CLASS_WORKSHOP_DATE_TIME,CLASS_ID,
CLASS_NOW_DATE_TIME,CAR_NUMBER,FAULT_FLAG,
OUT_ID,RELATED_ID
</sql>
<insert id="insertMydoJob" parameterType="com.project.joggle.domain.MydoJob">
INSERT INTO MYDO_JOB
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jobId != null">JOB_ID,</if>
<if test="status != null">STATUS,</if>
<if test="onLineType != null">ON_LINE_TYPE,</if>
<if test="taskNo != null">TASK_NO,</if>
<if test="supplierId != null">SUPPLIER_ID,</if>
<if test="customerId != null">CUSTOMER_ID,</if>
<if test="trayCode != null">TRAY_CODE,</if>
<if test="roadwayId != null">ROADWAY_ID,</if>
<if test="cargoSpaceId != null">CARGO_SPACE_ID,</if>
<if test="lineId != null">LINE_ID,</if>
<if test="workshopId != null">WORKSHOP_ID,</if>
<if test="entranceId != null">ENTRANCE_ID,</if>
<if test="exitId != null">EXIT_ID,</if>
<if test="priority != null">PRIORITY,</if>
<if test="inOrOut != null">IN_OR_OUT,</if>
<if test="createTime != null">CREATE_TIME,</if>
<if test="startTime != null">START_TIME,</if>
<if test="finishTime != null">FINISH_TIME,</if>
<if test="classNowName != null">CLASS_NOW_NAME,</if>
<if test="classWorkshopName != null">CLASS_WORKSHOP_NAME,</if>
<if test="warehouseId != null">WAREHOUSE_ID,</if>
<if test="targetRoadwayId != null">TARGET_ROADWAY_ID,</if>
<if test="targetCargoSpaceId != null">TARGET_CARGO_SPACE_ID,</if>
<if test="executionPhase != null">EXECUTION_PHASE,</if>
<if test="classgroupNumber != null">CLASSGROUP_NUMBER,</if>
<if test="classWorkshopDateTime != null">CLASS_WORKSHOP_DATE_TIME,</if>
<if test="classId != null">CLASS_ID,</if>
<if test="classNowDateTime != null">CLASS_NOW_DATE_TIME,</if>
<if test="carNumber != null">CAR_NUMBER,</if>
<if test="faultFlag != null">FAULT_FLAG,</if>
<if test="outId != null">OUT_ID,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jobId != null">#{jobId},</if>
<if test="status != null">#{status},</if>
<if test="onLineType != null">#{onLineType},</if>
<if test="taskNo != null">#{taskNo},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="customerId != null">#{customerId},</if>
<if test="trayCode != null">#{trayCode},</if>
<if test="roadwayId != null">#{roadwayId},</if>
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="lineId != null">#{lineId},</if>
<if test="workshopId != null">#{workshopId},</if>
<if test="entranceId != null">#{entranceId},</if>
<if test="exitId != null">#{exitId},</if>
<if test="priority != null">#{priority},</if>
<if test="inOrOut != null">#{inOrOut},</if>
<if test="createTime != null">#{createTime},</if>
<if test="startTime != null">#{startTime},</if>
<if test="finishTime != null">#{finishTime},</if>
<if test="classNowName != null">#{classNowName},</if>
<if test="classWorkshopName != null">#{classWorkshopName},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="targetRoadwayId != null">#{targetRoadwayId},</if>
<if test="targetCargoSpaceId != null">#{targetCargoSpaceId},</if>
<if test="executionPhase != null">#{executionPhase},</if>
<if test="classgroupNumber != null">#{classgroupNumber},</if>
<if test="classWorkshopDateTime != null">#{classWorkshopDateTime},</if>
<if test="classId != null">#{classId},</if>
<if test="classNowDateTime != null">#{classNowDateTime},</if>
<if test="carNumber != null">#{carNumber},</if>
<if test="faultFlag != null">#{faultFlag},</if>
<if test="outId != null">#{outId},</if>
</trim>
</insert>
<delete id="deleteMydoJobByJobId" parameterType="string">
DELETE FROM MYDO_JOB WHERE JOB_ID = #{jobId}
</delete>
<update id="updateMydoJob" parameterType="com.project.joggle.domain.MydoJob">
UPDATE MYDO_JOB
<set>
<if test="status != null">STATUS = #{status},</if>
<if test="onLineType != null">ON_LINE_TYPE = #{onLineType},</if>
<if test="taskNo != null">TASK_NO = #{taskNo},</if>
<if test="supplierId != null">SUPPLIER_ID = #{supplierId},</if>
<if test="customerId != null">CUSTOMER_ID = #{customerId},</if>
<if test="trayCode != null">TRAY_CODE = #{trayCode},</if>
<if test="roadwayId != null">ROADWAY_ID = #{roadwayId},</if>
<if test="cargoSpaceId != null">CARGO_SPACE_ID = #{cargoSpaceId},</if>
<if test="lineId != null">LINE_ID = #{lineId},</if>
<if test="workshopId != null">WORKSHOP_ID = #{workshopId},</if>
<if test="entranceId != null">ENTRANCE_ID = #{entranceId},</if>
<if test="exitId != null">EXIT_ID = #{exitId},</if>
<if test="priority != null">PRIORITY = #{priority},</if>
<if test="inOrOut != null">IN_OR_OUT = #{inOrOut},</if>
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
<if test="startTime != null">START_TIME = #{startTime},</if>
<if test="finishTime != null">FINISH_TIME = #{finishTime},</if>
<if test="classNowName != null">CLASS_NOW_NAME = #{classNowName},</if>
<if test="classWorkshopName != null">CLASS_WORKSHOP_NAME = #{classWorkshopName},</if>
<if test="warehouseId != null">WAREHOUSE_ID = #{warehouseId},</if>
<if test="targetRoadwayId != null">TARGET_ROADWAY_ID = #{targetRoadwayId},</if>
<if test="targetCargoSpaceId != null">TARGET_CARGO_SPACE_ID = #{targetCargoSpaceId},</if>
<if test="executionPhase != null">EXECUTION_PHASE = #{executionPhase},</if>
<if test="classgroupNumber != null">CLASSGROUP_NUMBER = #{classgroupNumber},</if>
<if test="classWorkshopDateTime != null">CLASS_WORKSHOP_DATE_TIME = #{classWorkshopDateTime},</if>
<if test="classId != null">CLASS_ID = #{classId},</if>
<if test="classNowDateTime != null">CLASS_NOW_DATE_TIME = #{classNowDateTime},</if>
<if test="carNumber != null">CAR_NUMBER = #{carNumber},</if>
<if test="faultFlag != null">FAULT_FLAG = #{faultFlag},</if>
<if test="outId != null">OUT_ID = #{outId},</if>
</set>
WHERE JOB_ID = #{jobId}
</update>
<select id="selectMydoJobByJobId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM MYDO_JOB
WHERE JOB_ID = #{jobId}
</select>
<select id="selectMydoJobList" parameterType="com.project.joggle.domain.MydoJob" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM MYDO_JOB
<where>
<if test="jobId != null">AND JOB_ID = #{jobId}</if>
<if test="status != null">AND STATUS = #{status}</if>
<if test="onLineType != null">AND ON_LINE_TYPE = #{onLineType}</if>
<if test="taskNo != null">AND TASK_NO = #{taskNo}</if>
<if test="supplierId != null">AND SUPPLIER_ID = #{supplierId}</if>
<if test="customerId != null">AND CUSTOMER_ID = #{customerId}</if>
<if test="trayCode != null">AND TRAY_CODE = #{trayCode}</if>
<if test="roadwayId != null">AND ROADWAY_ID = #{roadwayId}</if>
<if test="cargoSpaceId != null">AND CARGO_SPACE_ID = #{cargoSpaceId}</if>
<if test="lineId != null">AND LINE_ID = #{lineId}</if>
<if test="workshopId != null">AND WORKSHOP_ID = #{workshopId}</if>
<if test="entranceId != null">AND ENTRANCE_ID = #{entranceId}</if>
<if test="exitId != null">AND EXIT_ID = #{exitId}</if>
<if test="inOrOut != null">AND IN_OR_OUT = #{inOrOut}</if>
<if test="warehouseId != null">AND WAREHOUSE_ID = #{warehouseId}</if>
<if test="executionPhase != null">AND EXECUTION_PHASE = #{executionPhase}</if>
<if test="faultFlag != null">AND FAULT_FLAG = #{faultFlag}</if>
</where>
</select>
<select id="selectMydoJobByTrayCode" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM MYDO_JOB
WHERE TRAY_CODE = #{trayCode}
</select>
<update id="updateRelatedIdByTrayCode" parameterType="string">
update mydo_job set related_id = #{relatedId} where tray_code = #{trayCode}
</update>
</mapper>

View File

@@ -0,0 +1,100 @@
<?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">
<mapper namespace="com.project.joggle.mapper.OutPtsProductionDetailFinishMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.OutPtsProductionDetailFinish">
<result property="id" column="ID" jdbcType="VARCHAR"/>
<result property="action" column="ACTION" jdbcType="DECIMAL"/>
<result property="parentTraceCode" column="PARENT_TRACE_CODE" jdbcType="VARCHAR"/>
<result property="parentAppendCode" column="PARENT_APPEND_CODE" jdbcType="VARCHAR"/>
<result property="productNo" column="PRODUCT_NO" jdbcType="VARCHAR"/>
<result property="productName" column="PRODUCT_NAME" jdbcType="VARCHAR"/>
<result property="productSpec" column="PRODUCT_SPEC" jdbcType="VARCHAR"/>
<result property="packagingRatioName" column="PACKAGING_RATIO_NAME" jdbcType="VARCHAR"/>
<result property="productionDate" column="PRODUCTION_DATE" jdbcType="VARCHAR"/>
<result property="productionBatch" column="PRODUCTION_BATCH" jdbcType="VARCHAR"/>
<result property="expirationDate" column="EXPIRATION_DATE" jdbcType="VARCHAR"/>
<result property="sourceNo" column="SOURCE_NO" jdbcType="VARCHAR"/>
<result property="taskNo" column="TASK_NO" jdbcType="VARCHAR"/>
<result property="lineNo" column="LINE_NO" jdbcType="VARCHAR"/>
<result property="teamGroupNo" column="TEAM_GROUP_NO" jdbcType="VARCHAR"/>
<result property="machineNo" column="MACHINE_NO" jdbcType="VARCHAR"/>
<result property="fuzzy" column="FUZZY" jdbcType="DECIMAL"/>
<result property="curCode" column="CUR_CODE" jdbcType="VARCHAR"/>
<result property="scanNo" column="SCAN_NO" jdbcType="DECIMAL"/>
<result property="layerNo" column="LAYER_NO" jdbcType="DECIMAL"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="inType" column="IN_TYPE" jdbcType="VARCHAR"/>
<result property="compelete" column="COMPELETE" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID,ACTION,PARENT_TRACE_CODE,
PARENT_APPEND_CODE,PRODUCT_NO,PRODUCT_NAME,
PRODUCT_SPEC,PACKAGING_RATIO_NAME,PRODUCTION_DATE,
PRODUCTION_BATCH,EXPIRATION_DATE,SOURCE_NO,
TASK_NO,LINE_NO,TEAM_GROUP_NO,
MACHINE_NO,FUZZY,CUR_CODE,
SCAN_NO,LAYER_NO,STATUS,
IN_TYPE,COMPELETE
</sql>
<!-- 插入完成记录 -->
<insert id="insertOutPtsProductionDetailFinish" parameterType="com.project.joggle.domain.OutPtsProductionDetail">
insert into OUT_PTS_PRODUCTION_DETAIL_FINISH
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">ID,</if>
<if test="action != null">ACTION,</if>
<if test="parentTraceCode != null">PARENT_TRACE_CODE,</if>
<if test="parentAppendCode != null">PARENT_APPEND_CODE,</if>
<if test="productNo != null">PRODUCT_NO,</if>
<if test="productName != null">PRODUCT_NAME,</if>
<if test="productSpec != null">PRODUCT_SPEC,</if>
<if test="packagingRatioName != null">PACKAGING_RATIO_NAME,</if>
<if test="productionDate != null">PRODUCTION_DATE,</if>
<if test="productionBatch != null">PRODUCTION_BATCH,</if>
<if test="expirationDate != null">EXPIRATION_DATE,</if>
<if test="sourceNo != null">SOURCE_NO,</if>
<if test="taskNo != null">TASK_NO,</if>
<if test="lineNo != null">LINE_NO,</if>
<if test="teamGroupNo != null">TEAM_GROUP_NO,</if>
<if test="machineNo != null">MACHINE_NO,</if>
<if test="fuzzy != null">FUZZY,</if>
<if test="curCode != null">CUR_CODE,</if>
<if test="scanNo != null">SCAN_NO,</if>
<if test="layerNo != null">LAYER_NO,</if>
<if test="status != null">STATUS,</if>
<if test="inType != null">IN_TYPE,</if>
<if test="compelete != null">COMPELETE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=VARCHAR},</if>
<if test="action != null">#{action,jdbcType=DECIMAL},</if>
<if test="parentTraceCode != null">#{parentTraceCode,jdbcType=VARCHAR},</if>
<if test="parentAppendCode != null">#{parentAppendCode,jdbcType=VARCHAR},</if>
<if test="productNo != null">#{productNo,jdbcType=VARCHAR},</if>
<if test="productName != null">#{productName,jdbcType=VARCHAR},</if>
<if test="productSpec != null">#{productSpec,jdbcType=VARCHAR},</if>
<if test="packagingRatioName != null">#{packagingRatioName,jdbcType=VARCHAR},</if>
<if test="productionDate != null">#{productionDate,jdbcType=VARCHAR},</if>
<if test="productionBatch != null">#{productionBatch,jdbcType=VARCHAR},</if>
<if test="expirationDate != null">#{expirationDate,jdbcType=VARCHAR},</if>
<if test="sourceNo != null">#{sourceNo,jdbcType=VARCHAR},</if>
<if test="taskNo != null">#{taskNo,jdbcType=VARCHAR},</if>
<if test="lineNo != null">#{lineNo,jdbcType=VARCHAR},</if>
<if test="teamGroupNo != null">#{teamGroupNo,jdbcType=VARCHAR},</if>
<if test="machineNo != null">#{machineNo,jdbcType=VARCHAR},</if>
<if test="fuzzy != null">#{fuzzy,jdbcType=DECIMAL},</if>
<if test="curCode != null">#{curCode,jdbcType=VARCHAR},</if>
<if test="scanNo != null">#{scanNo,jdbcType=DECIMAL},</if>
<if test="layerNo != null">#{layerNo,jdbcType=DECIMAL},</if>
<if test="status != null">#{status,jdbcType=VARCHAR},</if>
<if test="inType != null">#{inType,jdbcType=VARCHAR},</if>
<if test="compelete != null">#{compelete,jdbcType=VARCHAR},</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,202 @@
<?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">
<mapper namespace="com.project.joggle.mapper.OutPtsProductionDetailMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.OutPtsProductionDetail">
<result property="id" column="ID" jdbcType="VARCHAR"/>
<result property="action" column="ACTION" jdbcType="DECIMAL"/>
<result property="parentTraceCode" column="PARENT_TRACE_CODE" jdbcType="VARCHAR"/>
<result property="parentAppendCode" column="PARENT_APPEND_CODE" jdbcType="VARCHAR"/>
<result property="productNo" column="PRODUCT_NO" jdbcType="VARCHAR"/>
<result property="productName" column="PRODUCT_NAME" jdbcType="VARCHAR"/>
<result property="productSpec" column="PRODUCT_SPEC" jdbcType="VARCHAR"/>
<result property="packagingRatioName" column="PACKAGING_RATIO_NAME" jdbcType="VARCHAR"/>
<result property="productionDate" column="PRODUCTION_DATE" jdbcType="VARCHAR"/>
<result property="productionBatch" column="PRODUCTION_BATCH" jdbcType="VARCHAR"/>
<result property="expirationDate" column="EXPIRATION_DATE" jdbcType="VARCHAR"/>
<result property="sourceNo" column="SOURCE_NO" jdbcType="VARCHAR"/>
<result property="taskNo" column="TASK_NO" jdbcType="VARCHAR"/>
<result property="lineNo" column="LINE_NO" jdbcType="VARCHAR"/>
<result property="teamGroupNo" column="TEAM_GROUP_NO" jdbcType="VARCHAR"/>
<result property="machineNo" column="MACHINE_NO" jdbcType="VARCHAR"/>
<result property="fuzzy" column="FUZZY" jdbcType="DECIMAL"/>
<result property="curCode" column="CUR_CODE" jdbcType="VARCHAR"/>
<result property="scanNo" column="SCAN_NO" jdbcType="DECIMAL"/>
<result property="layerNo" column="LAYER_NO" jdbcType="DECIMAL"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="inType" column="IN_TYPE" jdbcType="VARCHAR"/>
<result property="compelete" column="COMPELETE" jdbcType="VARCHAR"/>
<result property="errorcount" column="ERRORCOUNT" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID,ACTION,PARENT_TRACE_CODE,
PARENT_APPEND_CODE,PRODUCT_NO,PRODUCT_NAME,
PRODUCT_SPEC,PACKAGING_RATIO_NAME,PRODUCTION_DATE,
PRODUCTION_BATCH,EXPIRATION_DATE,SOURCE_NO,
TASK_NO,LINE_NO,TEAM_GROUP_NO,
MACHINE_NO,FUZZY,CUR_CODE,
SCAN_NO,LAYER_NO,STATUS,
IN_TYPE,COMPELETE,ERRORCOUNT
</sql>
<insert id="insert" parameterType="com.project.joggle.domain.OutPtsProductionDetail">
insert into OUT_PTS_PRODUCTION_DETAIL
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">ID,</if>
<if test="action != null">ACTION,</if>
<if test="parentTraceCode != null">PARENT_TRACE_CODE,</if>
<if test="parentAppendCode != null">PARENT_APPEND_CODE,</if>
<if test="productNo != null">PRODUCT_NO,</if>
<if test="productName != null">PRODUCT_NAME,</if>
<if test="productSpec != null">PRODUCT_SPEC,</if>
<if test="packagingRatioName != null">PACKAGING_RATIO_NAME,</if>
<if test="productionDate != null">PRODUCTION_DATE,</if>
<if test="productionBatch != null">PRODUCTION_BATCH,</if>
<if test="expirationDate != null">EXPIRATION_DATE,</if>
<if test="sourceNo != null">SOURCE_NO,</if>
<if test="taskNo != null">TASK_NO,</if>
<if test="lineNo != null">LINE_NO,</if>
<if test="teamGroupNo != null">TEAM_GROUP_NO,</if>
<if test="machineNo != null">MACHINE_NO,</if>
<if test="fuzzy != null">FUZZY,</if>
<if test="curCode != null">CUR_CODE,</if>
<if test="scanNo != null">SCAN_NO,</if>
<if test="layerNo != null">LAYER_NO,</if>
<if test="status != null">STATUS,</if>
<if test="inType != null">IN_TYPE,</if>
<if test="compelete != null">COMPELETE,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=VARCHAR},</if>
<if test="action != null">#{action,jdbcType=DECIMAL},</if>
<if test="parentTraceCode != null">#{parentTraceCode,jdbcType=VARCHAR},</if>
<if test="parentAppendCode != null">#{parentAppendCode,jdbcType=VARCHAR},</if>
<if test="productNo != null">#{productNo,jdbcType=VARCHAR},</if>
<if test="productName != null">#{productName,jdbcType=VARCHAR},</if>
<if test="productSpec != null">#{productSpec,jdbcType=VARCHAR},</if>
<if test="packagingRatioName != null">#{packagingRatioName,jdbcType=VARCHAR},</if>
<if test="productionDate != null">#{productionDate,jdbcType=VARCHAR},</if>
<if test="productionBatch != null">#{productionBatch,jdbcType=VARCHAR},</if>
<if test="expirationDate != null">#{expirationDate,jdbcType=VARCHAR},</if>
<if test="sourceNo != null">#{sourceNo,jdbcType=VARCHAR},</if>
<if test="taskNo != null">#{taskNo,jdbcType=VARCHAR},</if>
<if test="lineNo != null">#{lineNo,jdbcType=VARCHAR},</if>
<if test="teamGroupNo != null">#{teamGroupNo,jdbcType=VARCHAR},</if>
<if test="machineNo != null">#{machineNo,jdbcType=VARCHAR},</if>
<if test="fuzzy != null">#{fuzzy,jdbcType=DECIMAL},</if>
<if test="curCode != null">#{curCode,jdbcType=VARCHAR},</if>
<if test="scanNo != null">#{scanNo,jdbcType=DECIMAL},</if>
<if test="layerNo != null">#{layerNo,jdbcType=DECIMAL},</if>
<if test="status != null">#{status,jdbcType=VARCHAR},</if>
<if test="inType != null">#{inType,jdbcType=VARCHAR},</if>
<if test="compelete != null">#{compelete,jdbcType=VARCHAR},</if>
</trim>
</insert>
<delete id="deleteById" parameterType="java.lang.String">
delete from OUT_PTS_PRODUCTION_DETAIL where ID = #{id,jdbcType=VARCHAR}
</delete>
<update id="update" parameterType="com.project.joggle.domain.OutPtsProductionDetail">
update OUT_PTS_PRODUCTION_DETAIL
<set>
<if test="action != null">ACTION = #{action,jdbcType=DECIMAL},</if>
<if test="parentTraceCode != null">PARENT_TRACE_CODE = #{parentTraceCode,jdbcType=VARCHAR},</if>
<if test="parentAppendCode != null">PARENT_APPEND_CODE = #{parentAppendCode,jdbcType=VARCHAR},</if>
<if test="productNo != null">PRODUCT_NO = #{productNo,jdbcType=VARCHAR},</if>
<if test="productName != null">PRODUCT_NAME = #{productName,jdbcType=VARCHAR},</if>
<if test="productSpec != null">PRODUCT_SPEC = #{productSpec,jdbcType=VARCHAR},</if>
<if test="packagingRatioName != null">PACKAGING_RATIO_NAME = #{packagingRatioName,jdbcType=VARCHAR},</if>
<if test="productionDate != null">PRODUCTION_DATE = #{productionDate,jdbcType=VARCHAR},</if>
<if test="productionBatch != null">PRODUCTION_BATCH = #{productionBatch,jdbcType=VARCHAR},</if>
<if test="expirationDate != null">EXPIRATION_DATE = #{expirationDate,jdbcType=VARCHAR},</if>
<if test="sourceNo != null">SOURCE_NO = #{sourceNo,jdbcType=VARCHAR},</if>
<if test="taskNo != null">TASK_NO = #{taskNo,jdbcType=VARCHAR},</if>
<if test="lineNo != null">LINE_NO = #{lineNo,jdbcType=VARCHAR},</if>
<if test="teamGroupNo != null">TEAM_GROUP_NO = #{teamGroupNo,jdbcType=VARCHAR},</if>
<if test="machineNo != null">MACHINE_NO = #{machineNo,jdbcType=VARCHAR},</if>
<if test="fuzzy != null">FUZZY = #{fuzzy,jdbcType=DECIMAL},</if>
<if test="curCode != null">CUR_CODE = #{curCode,jdbcType=VARCHAR},</if>
<if test="scanNo != null">SCAN_NO = #{scanNo,jdbcType=DECIMAL},</if>
<if test="layerNo != null">LAYER_NO = #{layerNo,jdbcType=DECIMAL},</if>
<if test="status != null">STATUS = #{status,jdbcType=VARCHAR},</if>
<if test="inType != null">IN_TYPE = #{inType,jdbcType=VARCHAR},</if>
<if test="compelete != null">COMPELETE = #{compelete,jdbcType=VARCHAR},</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
<select id="selectById" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from OUT_PTS_PRODUCTION_DETAIL
where ID = #{id,jdbcType=VARCHAR}
</select>
<select id="selectList" parameterType="com.project.joggle.domain.OutPtsProductionDetail" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from OUT_PTS_PRODUCTION_DETAIL
<where>
<if test="id != null">and ID = #{id,jdbcType=VARCHAR}</if>
<if test="action != null">and ACTION = #{action,jdbcType=DECIMAL}</if>
<if test="parentTraceCode != null">and PARENT_TRACE_CODE = #{parentTraceCode,jdbcType=VARCHAR}</if>
<if test="parentAppendCode != null">and PARENT_APPEND_CODE = #{parentAppendCode,jdbcType=VARCHAR}</if>
<if test="productNo != null">and PRODUCT_NO = #{productNo,jdbcType=VARCHAR}</if>
<if test="productName != null">and PRODUCT_NAME = #{productName,jdbcType=VARCHAR}</if>
<if test="productSpec != null">and PRODUCT_SPEC = #{productSpec,jdbcType=VARCHAR}</if>
<if test="packagingRatioName != null">and PACKAGING_RATIO_NAME = #{packagingRatioName,jdbcType=VARCHAR}</if>
<if test="productionDate != null">and PRODUCTION_DATE = #{productionDate,jdbcType=VARCHAR}</if>
<if test="productionBatch != null">and PRODUCTION_BATCH = #{productionBatch,jdbcType=VARCHAR}</if>
<if test="expirationDate != null">and EXPIRATION_DATE = #{expirationDate,jdbcType=VARCHAR}</if>
<if test="sourceNo != null">and SOURCE_NO = #{sourceNo,jdbcType=VARCHAR}</if>
<if test="taskNo != null">and TASK_NO = #{taskNo,jdbcType=VARCHAR}</if>
<if test="lineNo != null">and LINE_NO = #{lineNo,jdbcType=VARCHAR}</if>
<if test="teamGroupNo != null">and TEAM_GROUP_NO = #{teamGroupNo,jdbcType=VARCHAR}</if>
<if test="machineNo != null">and MACHINE_NO = #{machineNo,jdbcType=VARCHAR}</if>
<if test="fuzzy != null">and FUZZY = #{fuzzy,jdbcType=DECIMAL}</if>
<if test="curCode != null">and CUR_CODE = #{curCode,jdbcType=VARCHAR}</if>
<if test="scanNo != null">and SCAN_NO = #{scanNo,jdbcType=DECIMAL}</if>
<if test="layerNo != null">and LAYER_NO = #{layerNo,jdbcType=DECIMAL}</if>
<if test="status != null">and STATUS = #{status,jdbcType=VARCHAR}</if>
<if test="inType != null">and IN_TYPE = #{inType,jdbcType=VARCHAR}</if>
<if test="compelete != null">and COMPELETE = #{compelete,jdbcType=VARCHAR}</if>
</where>
</select>
<select id="selectTopOutProductionDetail" resultMap="BaseResultMap">
SELECT * FROM (
SELECT
<include refid="Base_Column_List" />
FROM OUT_PTS_PRODUCTION_DETAIL
WHERE STATUS in (0,2)
and (ERRORCOUNT is null or ERRORCOUNT &lt; 3)
) WHERE ROWNUM = 1
</select>
<select id="selectOutPtsProductionDetailByParentAppendCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from OUT_PTS_PRODUCTION_DETAIL
where PARENT_APPEND_CODE = #{parentAppendCode} and status in (0,2) and SOURCE_NO =#{sourceNo}
</select>
<update id="updateStatusByParentAppendCode" parameterType="string">
update OUT_PTS_PRODUCTION_DETAIL set status = #{status} where parent_append_code = #{parentAppendCode} and source_no = #{sourceNo} and status in (0,2)
</update>
<update id="updateOutPtsProductionDetailByOrderNo" parameterType="string">
update OUT_PTS_PRODUCTION_DETAIL set status =#{status} where parent_append_code = #{parentAppendCode} and status>0
</update>
<delete id="deleteOutPtsProductionDetailByParentAppendCode" parameterType="string">
delete from OUT_PTS_PRODUCTION_DETAIL where parent_append_code = #{parentAppendCode} and source_no = #{sourceNo} and status=1
</delete>
<update id="updateErrorcountByParentAppendCode" parameterType="com.project.joggle.domain.OutPtsProductionDetail">
update OUT_PTS_PRODUCTION_DETAIL set errorcount = #{errorcount} where parent_append_code = #{parentAppendCode} and source_no = #{sourceNo} and status in (0,2)
</update>
</mapper>

View File

@@ -0,0 +1,61 @@
<?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">
<mapper namespace="com.project.joggle.mapper.OutStockoutMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.OutStockout">
<result property="stockoutId" column="STOCKOUT_ID" jdbcType="VARCHAR"/>
<result property="outType" column="OUT_TYPE" jdbcType="VARCHAR"/>
<result property="createDate" column="CREATE_DATE" jdbcType="TIMESTAMP"/>
<result property="customerNo" column="CUSTOMER_NO" jdbcType="VARCHAR"/>
<result property="createManId" column="CREATE_MAN_ID" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="warehouseId" column="WAREHOUSE_ID" jdbcType="VARCHAR"/>
<result property="classNowId" column="CLASS_NOW_ID" jdbcType="VARCHAR"/>
<result property="stockoutGuid" column="STOCKOUT_GUID" jdbcType="VARCHAR"/>
<result property="stockoutSource" column="STOCKOUT_SOURCE" jdbcType="VARCHAR"/>
<result property="exitId" column="EXIT_ID" jdbcType="VARCHAR"/>
<result property="carNumber" column="CAR_NUMBER" jdbcType="VARCHAR"/>
<result property="finishDate" column="FINISH_DATE" jdbcType="TIMESTAMP"/>
<result property="beganDate" column="BEGAN_DATE" jdbcType="TIMESTAMP"/>
<result property="fid" column="FID" jdbcType="VARCHAR"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
<result property="customerName" column="CUSTOMER_NAME" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
STOCKOUT_ID,OUT_TYPE,CREATE_DATE,
CUSTOMER_NO,CREATE_MAN_ID,STATUS,
WAREHOUSE_ID,CLASS_NOW_ID,STOCKOUT_GUID,
STOCKOUT_SOURCE,EXIT_ID,CAR_NUMBER,
FINISH_DATE,BEGAN_DATE,FID,
REMARK
</sql>
<select id="selectOutStockoutByStockoutId" parameterType="string" resultMap="BaseResultMap">
select distinct
o.STOCKOUT_ID,o.OUT_TYPE,o.CREATE_DATE,
o.CUSTOMER_NO,o.CREATE_MAN_ID,o.STATUS,
o.WAREHOUSE_ID,o.CLASS_NOW_ID,o.STOCKOUT_GUID,
o.STOCKOUT_SOURCE,o.EXIT_ID,o.CAR_NUMBER,
o.FINISH_DATE,o.BEGAN_DATE,o.FID,
o.REMARK,b.CUSTOMER_NAME
from OUT_STOCKOUT o left join BAS_CUSTOMER b on b.CUSTOMER_NO = o.CUSTOMER_NO
left join OUT_STOCKOUT_DETAIL d on d.STOCKOUT_GUID = o.STOCKOUT_GUID
where d.ERP_STOCKOUT_ID = #{stockoutId}
</select>
<select id="selectOutStockoutFinishByStockoutId" parameterType="string" resultMap="BaseResultMap">
select distinct
o.STOCKOUT_ID,o.OUT_TYPE,o.CREATE_DATE,
o.CUSTOMER_NO,o.CREATE_MAN_ID,o.STATUS,
o.WAREHOUSE_ID,o.CLASS_NOW_ID,o.STOCKOUT_GUID,
o.STOCKOUT_SOURCE,o.EXIT_ID,o.CAR_NUMBER,
o.FINISH_DATE,o.BEGAN_DATE,o.FID,
o.REMARK,b.CUSTOMER_NAME
from OUT_STOCKOUT_FINISH o left join BAS_CUSTOMER b on b.CUSTOMER_NO = o.CUSTOMER_NO
left join OUT_STOCKOUT_DETAIL_FINISH d on d.STOCKOUT_GUID = o.STOCKOUT_GUID
where d.ERP_STOCKOUT_ID = #{stockoutId}
</select>
</mapper>

View File

@@ -0,0 +1,70 @@
<?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">
<mapper namespace="com.project.joggle.mapper.RelationshipRestructurMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.RelationshipRestructur">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="curCode" column="CUR_CODE" jdbcType="VARCHAR"/>
<result property="parentCode" column="PARENT_CODE" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="errorcount" column="ERRORCOUNT" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID,CUR_CODE,PARENT_CODE,STATUS,ERRORCOUNT
</sql>
<select id="selectRelationshipRestructurList" parameterType="com.project.joggle.domain.RelationshipRestructur" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM RELATIONSHIP_RESTRUCTUR
<where>
<if test="id != null and id != ''">
AND ID = #{id}
</if>
<if test="curCode != null and curCode != ''">
AND CUR_CODE = #{curCode}
</if>
<if test="parentCode != null and parentCode != ''">
AND PARENT_CODE = #{parentCode}
</if>
<if test="status != null and status != ''">
AND STATUS = #{status}
</if>
</where>
</select>
<select id="selectTopRelationshipRestructur" resultMap="BaseResultMap">
SELECT * FROM (
SELECT
<include refid="Base_Column_List"/>
FROM RELATIONSHIP_RESTRUCTUR
WHERE STATUS in (0,2)
AND (ERRORCOUNT is null or ERRORCOUNT &lt;3)
) WHERE ROWNUM = 1
</select>
<select id="selectRelationshipRestructurByParentCode" resultMap="BaseResultMap" parameterType="string">
SELECT
<include refid="Base_Column_List"/>
FROM RELATIONSHIP_RESTRUCTUR
WHERE PARENT_CODE = #{parentCode}
and STATUS in (0,2)
</select>
<update id="updateRelationshipRestructur" parameterType="com.project.joggle.domain.RelationshipRestructur">
UPDATE RELATIONSHIP_RESTRUCTUR
<set>
<if test="status != null and status != ''">
STATUS = #{status},
</if>
<if test="errorcount != null and errorcount != ''">
ERRORCOUNT = #{errorcount}
</if>
</set>
WHERE PARENT_CODE = #{parentCode}
</update>
</mapper>

View File

@@ -0,0 +1,50 @@
<?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">
<mapper namespace="com.project.joggle.mapper.RemoveRelationshipMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.RemoveRelationship">
<id property="id" column="ID" jdbcType="VARCHAR"/>
<result property="curCode" column="CUR_CODE" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="errorcount" column="ERRORCOUNT" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID,CUR_CODE,STATUS,ERRORCOUNT
</sql>
<select id="selectRemoveRelationshipList" parameterType="RemoveRelationship" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from REMOVE_RELATIONSHIP
<where>
STATUS in (0,2)
and (ERRORCOUNT &lt; 3 or ERRORCOUNT is null)
<if test="id != null and id != ''">
and ID = #{id}
</if>
<if test="curCode != null and curCode != ''">
and CUR_CODE = #{curCode}
</if>
</where>
</select>
<update id="updateRemoveRelationship" parameterType="RemoveRelationship" >
update REMOVE_RELATIONSHIP
<set>
<if test="status != null and status != ''">
STATUS = #{status},
</if>
<if test="errorcount != null and errorcount != ''">
ERRORCOUNT = #{errorcount},
</if>
</set>
where ID = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,56 @@
<?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">
<mapper namespace="com.project.joggle.mapper.ReplaceRelationshipMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.ReplaceRelationship">
<result property="id" column="ID" jdbcType="VARCHAR"/>
<result property="oldTraceCode" column="OLD_TRACE_CODE" jdbcType="VARCHAR"/>
<result property="newTraceCode" column="NEW_TRACE_CODE" jdbcType="VARCHAR"/>
<result property="status" column="STATUS" jdbcType="VARCHAR"/>
<result property="errorcount" column="ERRORCOUNT" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
ID,OLD_TRACE_CODE,NEW_TRACE_CODE,
STATUS,ERRORCOUNT
</sql>
<select id="selectReplaceRelationshipList" parameterType="ReplaceRelationship" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM REPLACE_RELATIONSHIP
<where>
STATUS in (0,2)
and (ERRORCOUNT is null or ERRORCOUNT &lt;3)
<if test="id != null and id != ''">
AND ID = #{id}
</if>
<if test="oldTraceCode != null and oldTraceCode != ''">
AND OLD_TRACE_CODE = #{oldTraceCode}
</if>
<if test="newTraceCode != null and newTraceCode != ''">
AND NEW_TRACE_CODE = #{newTraceCode}
</if>
</where>
</select>
<update id="updateRelationshipRestructur" parameterType="ReplaceRelationship">
UPDATE REPLACE_RELATIONSHIP
<set>
<if test="status != null and status != ''">
STATUS = #{status},
</if>
<if test="errorcount !=null and errorcount != ''">
ERRORCOUNT= #{errorcount}
</if>
</set>
WHERE id = #{id}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<mapper namespace="com.project.joggle.mapper.ToKwmsAgjustMapper">
<resultMap id="BaseResultMap" type="com.project.joggle.domain.ToKwmsAgjust">
<id property="adjustId" column="ADJUST_ID" />
<result property="moyaBilltypeNumber" column="MOYA_BILLTYPE_NUMBER" />
<result property="orgNumber" column="ORG_NUMBER" />
<result property="moyaBiztime" column="MOYA_BIZTIME" />
<result property="moyaOwnertype" column="MOYA_OWNERTYPE" />
<result property="moyaOwnerNumber" column="MOYA_OWNER_NUMBER" />
<result property="moyaWarehouseNumber" column="MOYA_WAREHOUSE_NUMBER" />
<result property="billstatus" column="BILLSTATUS" />
<result property="moyaRemark" column="MOYA_REMARK" />
<result property="h7f1Sourcesystem" column="H7F1_SOURCESYSTEM" />
<result property="moyaHsrcbillno" column="MOYA_HSRCBILLNO" />
<result property="status" column="STATUS" />
<result property="returnCode" column="RETURN_CODE" />
<result property="returnMessage" column="RETURN_MESSAGE" />
<result property="createTime" column="CREATE_TIME" />
</resultMap>
<sql id="Base_Column_List">
ADJUST_ID,MOYA_BILLTYPE_NUMBER,ORG_NUMBER,MOYA_BIZTIME,MOYA_OWNERTYPE,MOYA_OWNER_NUMBER,
MOYA_WAREHOUSE_NUMBER,BILLSTATUS,MOYA_REMARK,H7F1_SOURCESYSTEM,MOYA_HSRCBILLNO,
STATUS,RETURN_CODE,RETURN_MESSAGE,CREATE_TIME
</sql>
</mapper>

View File

@@ -0,0 +1,6 @@
<html>
<body>
<h1>hello word!!!</h1>
<p>this is a html page</p>
</body>
</html>