工作令加工进度报表去重,虚拟打印,批次码生成。

master
yangwl 3 years ago
parent c3e9b02d44
commit 528c75a623

@ -744,7 +744,7 @@
</select>
<select id="findOperatorScheduleReport" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT cf.VALUE ITEM_NUMBER,
SELECT DISTINCT zsd.STEP_ID,cf.VALUE ITEM_NUMBER,
so.SHOP_ORDER,
i.ITEM,
it.DESCRIPTION ITEM_DESCRIPTION,
@ -763,7 +763,7 @@
CASE WHEN ZSD.PROD_HOURS IS NULL THEN 0
WHEN zab.NC_QTY IS NOT NULL THEN ROUND((zsd.DISPATCH_QTY - TO_NUMBER(zab.NC_QTY))*ZSD.PROD_HOURS ,4)
ELSE ROUND(zsd.DISPATCH_QTY*ZSD.PROD_HOURS ,4) END TOTAL_PROD_HOURS ,
zsd.EMPLOYEE_DESCRIPTION,
zsd.EMPLOYEE,zsd.EMPLOYEE_DESCRIPTION,
CASE WHEN ZUR.TEMPORARY_USER = 'true' THEN '临时'
WHEN ZUR.TEMPORARY_USER = 'false' THEN '正式' END EMPLOYEE_ATTR,
zsd.ACTUAL_START_DATE,

@ -235,6 +235,26 @@ public class SfcDispatchDto implements Serializable{
private String other4;
private String other5;
public Integer getPrintNum() {
return printNum;
}
public void setPrintNum(Integer printNum) {
this.printNum = printNum;
}
private Integer printNum;
private String printTemplate;
public String getPrintTemplate() {
return printTemplate;
}
public void setPrintTemplate(String printTemplate) {
this.printTemplate = printTemplate;
}
public String getHandle() {
return handle;
}

@ -0,0 +1,19 @@
package com.foreverwin.mesnac.common.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.common.model.ItemBatchdDto;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author Leon.L
* @since 2021-06-18
*/
@Repository
public interface ItemBatchMapperSave extends BaseMapper<ItemBatchdDto> {
}

@ -0,0 +1,260 @@
package com.foreverwin.mesnac.common.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-06-28
*/
@TableName("Z_ITEM_BATCH")
public class ItemBatchdDto extends Model<ItemBatchdDto> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableId(value = "HANDLE", type = IdType.INPUT)
private String handle;
/**
*
*/
@TableField("SITE")
private String site;
/**
*
*/
@TableField("FACTORY")
private String factory;
/**
*
*/
@TableField("ITEM")
private String item;
/**
*
*/
@TableField("BATCH")
private String batch;
/**
*
*/
@TableField("SPEC")
private String spec;
/**
*
*/
@TableField("TEXTURE")
private String texture;
/**
*
*/
@TableField("SUPPLIER")
private String supplier;
/**
*
*/
@TableField("LABEL")
private String label;
@TableField("IS_PRINT")
private String isPrint;
/**
*
*/
@TableField("CREATE_USER")
private String createUser;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("MODIFY_USER")
private String modifyUser;
/**
*
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getFactory() {
return factory;
}
public void setFactory(String factory) {
this.factory = factory;
}
public String getItem() {
return item;
}
public void setItem(String item) {
this.item = item;
}
public String getBatch() {
return batch;
}
public void setBatch(String batch) {
this.batch = batch;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getTexture() {
return texture;
}
public void setTexture(String texture) {
this.texture = texture;
}
public String getSupplier() {
return supplier;
}
public void setSupplier(String supplier) {
this.supplier = supplier;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getIsPrint() {
return isPrint;
}
public void setIsPrint(String isPrint) {
this.isPrint = isPrint;
}
public String getCreateUser() {
return createUser;
}
public void setCreateUser(String createUser) {
this.createUser = createUser;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public String getModifyUser() {
return modifyUser;
}
public void setModifyUser(String modifyUser) {
this.modifyUser = modifyUser;
}
public LocalDateTime getModifiedDateTime() {
return modifiedDateTime;
}
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
this.modifiedDateTime = modifiedDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String FACTORY = "FACTORY";
public static final String ITEM = "ITEM";
public static final String BATCH = "BATCH";
public static final String SPEC = "SPEC";
public static final String TEXTURE = "TEXTURE";
public static final String SUPPLIER = "SUPPLIER";
public static final String LABEL = "LABEL";
public static final String IS_PRINT = "IS_PRINT";
public static final String CREATE_USER = "CREATE_USER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFY_USER = "MODIFY_USER";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "ItemBatch{" +
"handle = " + handle +
", site = " + site +
", factory = " + factory +
", item = " + item +
", batch = " + batch +
", spec = " + spec +
", texture = " + texture +
", supplier = " + supplier +
", label = " + label +
", isPrint = " + isPrint +
", createUser = " + createUser +
", createdDateTime = " + createdDateTime +
", modifyUser = " + modifyUser +
", modifiedDateTime = " + modifiedDateTime +
"}";
}
}

@ -0,0 +1,21 @@
package com.foreverwin.mesnac.common.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.common.model.ItemBatchdDto;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-06-18
*/
public interface ItemBatchServiceSave extends IService<ItemBatchdDto> {
}

@ -60,4 +60,6 @@ public interface PrintLogService extends IService<PrintLog> {
* @param printLogList,deleteTableList
*/
void barcodeMaintenance(List<LabelPrintDto> printLogList);
}

@ -0,0 +1,32 @@
package com.foreverwin.mesnac.common.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.common.mapper.ItemBatchMapperSave;
import com.foreverwin.mesnac.common.model.ItemBatchdDto;
import com.foreverwin.mesnac.common.service.ItemBatchServiceSave;
import com.foreverwin.mesnac.common.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-06-18
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class ItemBatchServiceImplSave extends ServiceImpl<ItemBatchMapperSave, ItemBatchdDto> implements ItemBatchServiceSave {
}

@ -8,16 +8,18 @@ import com.alibaba.fastjson.JSONObject;
import com.foreverwin.mesnac.common.constant.Constants;
import com.foreverwin.mesnac.common.dto.LabelPrintDto;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.model.ItemBatchdDto;
import com.foreverwin.mesnac.common.model.PrintLog;
import com.foreverwin.mesnac.common.mapper.PrintLogMapper;
import com.foreverwin.mesnac.common.service.ItemBatchServiceSave;
import com.foreverwin.mesnac.common.service.PrintLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.foreverwin.mesnac.common.util.DrawPrepareProducts;
import com.foreverwin.mesnac.common.util.QRUtils;
import com.foreverwin.modular.core.exception.BusinessException;
import com.foreverwin.modular.core.util.CommonMethods;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Image;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.pdf.PdfWriter;
@ -27,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.io.*;
import java.math.BigDecimal;
@ -73,6 +74,10 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
@Autowired
private PrintLogService printLogService;
@Autowired
private ItemBatchServiceSave itemBatchServiceSave;
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void savePrintLog(String site, String user, PrintLog printLog) {
@ -134,6 +139,7 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
Document document = new Document(PageSize.A4);// 建立一个Document对象
// 2.建立一个书写器(Writer)与document对象关联
String path="/exportpdf/Label.pdf";
// String path="D:\\img\\Label.pdf";
File file = new File(path);
file.createNewFile();
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
@ -256,9 +262,24 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
String site = CommonMethods.getSite();
List<PrintLog> list = new ArrayList();
List<ItemBatchdDto> itemBatchdDtoList=new ArrayList<>();
for (int i =0;i<labelPrintDtos.size();i++) {
PrintLog printLog = new PrintLog();
ItemBatchdDto itemBatchdDto=new ItemBatchdDto();
itemBatchdDto.setHandle(HandleEnum.ITEM_BATCH.getHandle(site, labelPrintDtos.get(i).getItem(),labelPrintDtos.get(i).getBatch()));
itemBatchdDto.setSite(site);
itemBatchdDto.setFactory("6106");
itemBatchdDto.setItem(labelPrintDtos.get(i).getItem());
itemBatchdDto.setBatch(labelPrintDtos.get(i).getBatch());
itemBatchdDto.setSupplier("CSH");
itemBatchdDto.setLabel(labelPrintDtos.get(i).getItem()+"*"+labelPrintDtos.get(i).getBatch());
itemBatchdDto.setIsPrint("N");
itemBatchdDto.setCreateUser(CommonMethods.getUser());
itemBatchdDto.setCreatedDateTime(LocalDateTime.now());
itemBatchdDto.setModifyUser(CommonMethods.getUser());
itemBatchdDto.setModifiedDateTime(LocalDateTime.now());
itemBatchdDtoList.add(itemBatchdDto);
printLog.setHandle(labelPrintDtos.get(i).getLabel());
printLog.setSite(site);
printLog.setCategory("INV");
@ -272,7 +293,9 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
printLog.setPrintParam(JSON.toJSONString(labelPrintDtos.get(i)));
list.add(printLog);
}
itemBatchServiceSave.saveBatch(itemBatchdDtoList);
printLogService.saveBatch(list);
}
public void printServer(List<LabelPrintDto> list){

@ -38,7 +38,7 @@ public class DrawPrepareProducts {
Graphics2D g = bufImg.createGraphics();
g.drawImage(srcImg, 0, 0, srcImgWidth, srcImgHeight, null);
// Font font = new Font("Courier New", Font.PLAIN, 12);
Font font = new Font("宋体", Font.PLAIN, 20);
Font font = new Font("Serif", Font.PLAIN, 20);
g.setColor(markContentColor); // 根据图片的背景设置水印颜色
g.setFont(font);
g.drawString(shf, 100, 40);
@ -71,7 +71,8 @@ public class DrawPrepareProducts {
g.drawString(wlbm, 100, 420);
g.dispose();
//插入生成好的二维码图片
QRUtils.insertImage(bufImg,"D:\\img\\QRCODE.jpg",false);
// QRUtils.insertImage(bufImg,"D:\\img\\QRCODE.jpg",false);
QRUtils.insertImage(bufImg,"/exportpdf/QRCODE.jpg",false);
// 输出图片
FileOutputStream outImgStream = new FileOutputStream(outImgPath);
ImageIO.write(bufImg, "jpg", outImgStream);

@ -31,10 +31,10 @@ public class TokenSingleton {
private Map<String, String> map = new HashMap<>();
private TokenSingleton() {
public TokenSingleton() {
}
private static TokenSingleton single = null;
public static TokenSingleton single = null;
// 静态工厂方法
public static TokenSingleton getInstance() {

@ -0,0 +1,227 @@
<?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.foreverwin.mesnac.common.mapper.ItemBatchMapperSave">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.ItemBatchdDto">
<id column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="FACTORY" property="factory" />
<result column="ITEM" property="item" />
<result column="BATCH" property="batch" />
<result column="SPEC" property="spec" />
<result column="TEXTURE" property="texture" />
<result column="SUPPLIER" property="supplier" />
<result column="LABEL" property="label" />
<result column="IS_PRINT" property="isPrint" />
<result column="CREATE_USER" property="createUser" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFY_USER" property="modifyUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, FACTORY, ITEM, BATCH, SPEC, TEXTURE, SUPPLIER, LABEL, IS_PRINT, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME
</sql>
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.ItemBatchdDto">
INSERT INTO Z_ITEM_BATCH
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="factory!=null">FACTORY,</if>
<if test="item!=null">ITEM,</if>
<if test="batch!=null">BATCH,</if>
<if test="spec!=null">SPEC,</if>
<if test="texture!=null">TEXTURE,</if>
<if test="supplier!=null">SUPPLIER,</if>
<if test="label!=null">LABEL,</if>
<if test="isPrint!=null">IS_PRINT,</if>
<if test="createUser!=null">CREATE_USER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifyUser!=null">MODIFY_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="factory!=null">#{factory},</if>
<if test="item!=null">#{item},</if>
<if test="batch!=null">#{batch},</if>
<if test="spec!=null">#{spec},</if>
<if test="texture!=null">#{texture},</if>
<if test="supplier!=null">#{supplier},</if>
<if test="label!=null">#{label},</if>
<if test="isPrint!=null">#{isPrint},</if>
<if test="createUser!=null">#{createUser},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifyUser!=null">#{modifyUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.ItemBatchdDto">
INSERT INTO Z_ITEM_BATCH
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{factory},
#{item},
#{batch},
#{spec},
#{texture},
#{supplier},
#{label},
#{isPrint},
#{createUser},
#{createdDateTime},
#{modifyUser},
#{modifiedDateTime},
</trim>
</insert>
<update id="updateById">
UPDATE Z_ITEM_BATCH <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.factory!=null">FACTORY=#{et.factory},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.batch!=null">BATCH=#{et.batch},</if>
<if test="et.spec!=null">SPEC=#{et.spec},</if>
<if test="et.texture!=null">TEXTURE=#{et.texture},</if>
<if test="et.supplier!=null">SUPPLIER=#{et.supplier},</if>
<if test="et.label!=null">LABEL=#{et.label},</if>
<if test="et.isPrint!=null">IS_PRINT=#{et.isPrint},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="updateAllColumnById">
UPDATE Z_ITEM_BATCH <trim prefix="SET" suffixOverrides=",">
SITE=#{et.site},
FACTORY=#{et.factory},
ITEM=#{et.item},
BATCH=#{et.batch},
SPEC=#{et.spec},
TEXTURE=#{et.texture},
SUPPLIER=#{et.supplier},
LABEL=#{et.label},
IS_PRINT=#{et.isPrint},
CREATE_USER=#{et.createUser},
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFY_USER=#{et.modifyUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
<update id="update">
UPDATE Z_ITEM_BATCH <trim prefix="SET" suffixOverrides=",">
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.factory!=null">FACTORY=#{et.factory},</if>
<if test="et.item!=null">ITEM=#{et.item},</if>
<if test="et.batch!=null">BATCH=#{et.batch},</if>
<if test="et.spec!=null">SPEC=#{et.spec},</if>
<if test="et.texture!=null">TEXTURE=#{et.texture},</if>
<if test="et.supplier!=null">SUPPLIER=#{et.supplier},</if>
<if test="et.label!=null">LABEL=#{et.label},</if>
<if test="et.isPrint!=null">IS_PRINT=#{et.isPrint},</if>
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.factory!=null"> AND FACTORY=#{ew.entity.factory}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.spec!=null"> AND SPEC=#{ew.entity.spec}</if>
<if test="ew.entity.texture!=null"> AND TEXTURE=#{ew.entity.texture}</if>
<if test="ew.entity.supplier!=null"> AND SUPPLIER=#{ew.entity.supplier}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.isPrint!=null"> AND IS_PRINT=#{ew.entity.isPrint}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteById">
DELETE FROM Z_ITEM_BATCH WHERE HANDLE=#{handle}
</delete>
<delete id="deleteByMap">
DELETE FROM Z_ITEM_BATCH
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_ITEM_BATCH
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.factory!=null"> AND FACTORY=#{ew.entity.factory}</if>
<if test="ew.entity.item!=null"> AND ITEM=#{ew.entity.item}</if>
<if test="ew.entity.batch!=null"> AND BATCH=#{ew.entity.batch}</if>
<if test="ew.entity.spec!=null"> AND SPEC=#{ew.entity.spec}</if>
<if test="ew.entity.texture!=null"> AND TEXTURE=#{ew.entity.texture}</if>
<if test="ew.entity.supplier!=null"> AND SUPPLIER=#{ew.entity.supplier}</if>
<if test="ew.entity.label!=null"> AND LABEL=#{ew.entity.label}</if>
<if test="ew.entity.isPrint!=null"> AND IS_PRINT=#{ew.entity.isPrint}</if>
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<delete id="deleteBatchIds">
DELETE FROM Z_ITEM_BATCH WHERE HANDLE IN (
<foreach item="item" index="index" collection="coll" separator=",">#{item}
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -28,5 +28,10 @@
<groupId>com.foreverwin.modular</groupId>
<artifactId>modular-melib</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
</dependencies>
</project>

@ -67,7 +67,7 @@
<dependency>
<groupId>com.foreverwin.modular</groupId>
<artifactId>modular-core</artifactId>
<version>1.0-SNAPSHOT.standlone-hana</version>
<version>1.1.4-SNAPSHOT.standlone-hana</version>
</dependency>
<dependency>
@ -96,6 +96,33 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.26</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.26</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>

@ -165,7 +165,7 @@ public class PodTemplateServiceImpl implements PodTemplateService {
if (resultMap == null) {
throw new BaseException("根据当前资源未找到条码[" + sfc + "]的基本信息!");
}
if(resultMap.get("EMPLOYEE_DESCRIPTION")==null||resultMap.get("EMPLOYEE_DESCRIPTION").equals("")){
if(resultMap.get("EMPLOYEE_DESCRIPTION")==null||resultMap.get("EMPLOYEE_DESCRIPTION").equals("")||resultMap.get("EMPLOYEE")==null||resultMap.get("EMPLOYEE").equals("")){
throw new BaseException("产品条码[" + sfc + "]的操作人员为空!请联系调度人员维护!");
}
//List<Map<String, Object>> substepList = sfcCrossMapper.querySfcStep(site, sfc, operationBySfcBo.getOperation());

@ -94,7 +94,7 @@
CASE WHEN ST.STATUS='403' AND SS.QTY_IN_QUEUE > 0 THEN N'402' ELSE ST.STATUS END STATUS,
OP.OPERATION, OT.DESCRIPTION OPERATION_DESC,OP.OPERATION||'/'||RS.STEP_ID OPERATION_STEP,
RO_CF2.VALUE TOOL ,SOD.HANDLE SFC_DISPATCH_DETAIL_BO,SOD.WORK_CENTER,SOD.PROD_HOURS,
S.SFC,S.QTY SFC_QTY,RS.STEP_ID, SOD.DISPATCH_NO,SOD.EMPLOYEE_DESCRIPTION,
S.SFC,S.QTY SFC_QTY,RS.STEP_ID, SOD.DISPATCH_NO,SOD.EMPLOYEE_DESCRIPTION,SOD.EMPLOYEE,
TO_CHAR( SOD.PLANNED_START_DATE + INTERVAL '8' HOUR,'yyyy-mm-dd hh24:mi:ss')START_DATE,
TO_CHAR(SOD.PLANNED_COMP_DATE + INTERVAL '8' HOUR ,'yyyy-mm-dd hh24:mi:ss')COMP_DATE,
TO_CHAR((SOD.PLANNED_COMP_DATE - SOD.PLANNED_START_DATE )*24,'fm9999999990.00')||'H' ADD_DATE,
@ -117,13 +117,13 @@
INNER JOIN ITEM I ON I.HANDLE = S.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE AND IT.LOCALE =#{locale}
INNER JOIN (
SELECT SD.HANDLE, SD.SFC,SD.RESRCE,SD.OPERATION,SD.STEP_ID,SD.PLANNED_COMP_DATE, SD.PLANNED_START_DATE,SD.DISPATCH_NO,SD.WORK_CENTER,SD.PROD_HOURS,SD.EMPLOYEE_DESCRIPTION
SELECT SD.HANDLE, SD.SFC,SD.RESRCE,SD.OPERATION,SD.STEP_ID,SD.PLANNED_COMP_DATE, SD.PLANNED_START_DATE,SD.DISPATCH_NO,SD.WORK_CENTER,SD.PROD_HOURS,SD.EMPLOYEE_DESCRIPTION,SD.EMPLOYEE
FROM Z_PROD_READY_TASK RB
INNER JOIN Z_SFC_DISPATCH SD ON SD.HANDLE = RB.SFC_DISPATCH_BO
WHERE RB.SITE =#{site} AND RB.STATUS = 'FINISH' AND RB."RESULT"='OK'
) SOD ON SOD.RESRCE =#{dto.resrce} AND SOD.SFC= S.SFC AND SOD.OPERATION = OP.OPERATION and SS.STEP_ID=SOD.STEP_ID
WHERE S.SITE = #{site} AND S.SFC = #{dto.sfc} AND ROWNUM=1
GROUP BY SO.SHOP_ORDER, SO_CF.VALUE , I.ITEM, IT.DESCRIPTION ,SOD.WORK_CENTER,SO_CF2.VALUE,SOD.PROD_HOURS,SOD.EMPLOYEE_DESCRIPTION,
GROUP BY SO.SHOP_ORDER, SO_CF.VALUE , I.ITEM, IT.DESCRIPTION ,SOD.WORK_CENTER,SO_CF2.VALUE,SOD.PROD_HOURS,SOD.EMPLOYEE_DESCRIPTION,SOD.EMPLOYEE,
CASE WHEN ST.STATUS='403' AND SS.QTY_IN_QUEUE > 0 THEN N'402' ELSE ST.STATUS END,
OP.OPERATION, OT.DESCRIPTION ,OP.OPERATION||'/'||RS.STEP_ID ,RO_CF2.VALUE,
S.SFC,S.QTY ,RS.STEP_ID,SOD.DISPATCH_NO , SOD.HANDLE ,

Loading…
Cancel
Save