Merge remote-tracking branch 'origin/master'
commit
a7c70e552d
@ -0,0 +1,44 @@
|
||||
package com.hw.common.core.constant;
|
||||
|
||||
/**
|
||||
* @Description: 打印常量定义
|
||||
* @ClassName: PrintConstants
|
||||
* @Author : xins
|
||||
* @Date :2024-11-7 13:51
|
||||
* @Version :1.0
|
||||
*/
|
||||
public class PrintConstants {
|
||||
|
||||
public static final int TYPE_TEXT = 1;
|
||||
public static final int TYPE_CHECKBOX = 2;
|
||||
public static final int TYPE_QRCODE = 3;
|
||||
|
||||
public static final String PRINT_TYPE_RAW_LABEL = "1";
|
||||
public static final String PRINT_TYPE_PRODUCT_LABEL = "3";
|
||||
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_MATERIAL_NAME = "materialName";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_MATERIAL_CODE = "materialCode";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_PO_NO = "poNo";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_MATERIAL_SPEC = "materialSpec";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_YES = "preMaterialYes";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_NO = "preMaterialNo";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_SALE_ORDER_CODE = "saleOrderCode";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_QTY = "qty";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_BATCH_CODE = "batchCode";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_QC_RESULT_YES = "qcResultYes";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_QC_RESULT_NO = "qcResultNo";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_QRCODE = "qrcode";
|
||||
public static final String RAW_MATERIAL_LABEL_KEY_BARCODE = "barcode";
|
||||
|
||||
public static final String PRODUCT_PLAN_CODE = "productPlanCode";
|
||||
|
||||
|
||||
public static final String PRINT_TEMPLATE_RAW = "raw";
|
||||
public static final String PRINT_TEMPLATE_PRODUCT = "product";
|
||||
public static final String PRINT_TEMPLATE_BIND = "bind";
|
||||
public static final String PRINT_TEMPLATE_SMALL = "small";
|
||||
|
||||
public static final String SMALL_LABEL_KEY_TEXT = "text";
|
||||
public static final String SMALL_LABEL_KEY_QRCODE = "qrcode";
|
||||
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 生产统计明细使用物料情况;车间生产派工对象 mes_produce_statistics_detail_material
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public class MesProduceStatisticsDetailMaterial extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long statisticsDetailMaterialId;
|
||||
|
||||
/** 生产统计明细ID */
|
||||
@Excel(name = "生产统计明细ID")
|
||||
private Long statisticsDetailId;
|
||||
|
||||
/** 物料ID */
|
||||
@Excel(name = "物料ID")
|
||||
private Long materialId;
|
||||
|
||||
/** 物料编码 */
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
/** 物料名称 */
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/** 物料规格 */
|
||||
@Excel(name = "物料规格")
|
||||
private String materialSpec;
|
||||
|
||||
/** 使用数量 */
|
||||
@Excel(name = "使用数量")
|
||||
private BigDecimal usedAmount;
|
||||
|
||||
public void setStatisticsDetailMaterialId(Long statisticsDetailMaterialId)
|
||||
{
|
||||
this.statisticsDetailMaterialId = statisticsDetailMaterialId;
|
||||
}
|
||||
|
||||
public Long getStatisticsDetailMaterialId()
|
||||
{
|
||||
return statisticsDetailMaterialId;
|
||||
}
|
||||
public void setStatisticsDetailId(Long statisticsDetailId)
|
||||
{
|
||||
this.statisticsDetailId = statisticsDetailId;
|
||||
}
|
||||
|
||||
public Long getStatisticsDetailId()
|
||||
{
|
||||
return statisticsDetailId;
|
||||
}
|
||||
public void setMaterialId(Long materialId)
|
||||
{
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public Long getMaterialId()
|
||||
{
|
||||
return materialId;
|
||||
}
|
||||
public void setMaterialCode(String materialCode)
|
||||
{
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode()
|
||||
{
|
||||
return materialCode;
|
||||
}
|
||||
public void setMaterialName(String materialName)
|
||||
{
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName()
|
||||
{
|
||||
return materialName;
|
||||
}
|
||||
public void setMaterialSpec(String materialSpec)
|
||||
{
|
||||
this.materialSpec = materialSpec;
|
||||
}
|
||||
|
||||
public String getMaterialSpec()
|
||||
{
|
||||
return materialSpec;
|
||||
}
|
||||
public void setUsedAmount(BigDecimal usedAmount)
|
||||
{
|
||||
this.usedAmount = usedAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getUsedAmount()
|
||||
{
|
||||
return usedAmount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("statisticsDetailMaterialId", getStatisticsDetailMaterialId())
|
||||
.append("statisticsDetailId", getStatisticsDetailId())
|
||||
.append("materialId", getMaterialId())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("materialSpec", getMaterialSpec())
|
||||
.append("usedAmount", getUsedAmount())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesPrdBarcodeInfo;
|
||||
|
||||
/**
|
||||
* 小包条码Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public interface MesPrdBarcodeInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询小包条码
|
||||
*
|
||||
* @param prdBarcodeId 小包条码主键
|
||||
* @return 小包条码
|
||||
*/
|
||||
public MesPrdBarcodeInfo selectMesPrdBarcodeInfoByPrdBarcodeId(Long prdBarcodeId);
|
||||
|
||||
/**
|
||||
* 查询小包条码列表
|
||||
*
|
||||
* @param mesPrdBarcodeInfo 小包条码
|
||||
* @return 小包条码集合
|
||||
*/
|
||||
public List<MesPrdBarcodeInfo> selectMesPrdBarcodeInfoList(MesPrdBarcodeInfo mesPrdBarcodeInfo);
|
||||
|
||||
/**
|
||||
* 新增小包条码
|
||||
*
|
||||
* @param mesPrdBarcodeInfo 小包条码
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesPrdBarcodeInfo(MesPrdBarcodeInfo mesPrdBarcodeInfo);
|
||||
|
||||
/**
|
||||
* 修改小包条码
|
||||
*
|
||||
* @param mesPrdBarcodeInfo 小包条码
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesPrdBarcodeInfo(MesPrdBarcodeInfo mesPrdBarcodeInfo);
|
||||
|
||||
/**
|
||||
* 删除小包条码
|
||||
*
|
||||
* @param prdBarcodeId 小包条码主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPrdBarcodeInfoByPrdBarcodeId(Long prdBarcodeId);
|
||||
|
||||
/**
|
||||
* 批量删除小包条码
|
||||
*
|
||||
* @param prdBarcodeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesPrdBarcodeInfoByPrdBarcodeIds(Long[] prdBarcodeIds);
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesProduceStatisticsDetail;
|
||||
import com.hw.mes.domain.MesProduceStatisticsDetailMaterial;
|
||||
|
||||
/**
|
||||
* 生产统计明细Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public interface MesProduceStatisticsDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产统计明细
|
||||
*
|
||||
* @param statisticsDetailId 生产统计明细主键
|
||||
* @return 生产统计明细
|
||||
*/
|
||||
public MesProduceStatisticsDetail selectMesProduceStatisticsDetailByStatisticsDetailId(Long statisticsDetailId);
|
||||
|
||||
/**
|
||||
* 查询生产统计明细列表
|
||||
*
|
||||
* @param mesProduceStatisticsDetail 生产统计明细
|
||||
* @return 生产统计明细集合
|
||||
*/
|
||||
public List<MesProduceStatisticsDetail> selectMesProduceStatisticsDetailList(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||
|
||||
/**
|
||||
* 新增生产统计明细
|
||||
*
|
||||
* @param mesProduceStatisticsDetail 生产统计明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesProduceStatisticsDetail(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||
|
||||
/**
|
||||
* 修改生产统计明细
|
||||
*
|
||||
* @param mesProduceStatisticsDetail 生产统计明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesProduceStatisticsDetail(MesProduceStatisticsDetail mesProduceStatisticsDetail);
|
||||
|
||||
/**
|
||||
* 删除生产统计明细
|
||||
*
|
||||
* @param statisticsDetailId 生产统计明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProduceStatisticsDetailByStatisticsDetailId(Long statisticsDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除生产统计明细
|
||||
*
|
||||
* @param statisticsDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProduceStatisticsDetailByStatisticsDetailIds(Long[] statisticsDetailIds);
|
||||
|
||||
/**
|
||||
* 批量删除生产统计明细使用物料情况;车间生产派工
|
||||
*
|
||||
* @param statisticsDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProduceStatisticsDetailMaterialByStatisticsDetailIds(Long[] statisticsDetailIds);
|
||||
|
||||
/**
|
||||
* 批量新增生产统计明细使用物料情况;车间生产派工
|
||||
*
|
||||
* @param mesProduceStatisticsDetailMaterialList 生产统计明细使用物料情况;车间生产派工列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchMesProduceStatisticsDetailMaterial(List<MesProduceStatisticsDetailMaterial> mesProduceStatisticsDetailMaterialList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过生产统计明细主键删除生产统计明细使用物料情况;车间生产派工信息
|
||||
*
|
||||
* @param statisticsDetailId 生产统计明细ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesProduceStatisticsDetailMaterialByStatisticsDetailId(Long statisticsDetailId);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesStatusChangeInfo;
|
||||
|
||||
/**
|
||||
* 状态变化信息Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-11-07
|
||||
*/
|
||||
public interface MesStatusChangeInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询状态变化信息
|
||||
*
|
||||
* @param statusChangeInfoId 状态变化信息主键
|
||||
* @return 状态变化信息
|
||||
*/
|
||||
public MesStatusChangeInfo selectMesStatusChangeInfoByStatusChangeInfoId(Long statusChangeInfoId);
|
||||
|
||||
/**
|
||||
* 查询状态变化信息列表
|
||||
*
|
||||
* @param mesStatusChangeInfo 状态变化信息
|
||||
* @return 状态变化信息集合
|
||||
*/
|
||||
public List<MesStatusChangeInfo> selectMesStatusChangeInfoList(MesStatusChangeInfo mesStatusChangeInfo);
|
||||
|
||||
/**
|
||||
* 新增状态变化信息
|
||||
*
|
||||
* @param mesStatusChangeInfo 状态变化信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesStatusChangeInfo(MesStatusChangeInfo mesStatusChangeInfo);
|
||||
|
||||
/**
|
||||
* 修改状态变化信息
|
||||
*
|
||||
* @param mesStatusChangeInfo 状态变化信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesStatusChangeInfo(MesStatusChangeInfo mesStatusChangeInfo);
|
||||
|
||||
/**
|
||||
* 删除状态变化信息
|
||||
*
|
||||
* @param statusChangeInfoId 状态变化信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesStatusChangeInfoByStatusChangeInfoId(Long statusChangeInfoId);
|
||||
|
||||
/**
|
||||
* 批量删除状态变化信息
|
||||
*
|
||||
* @param statusChangeInfoIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesStatusChangeInfoByStatusChangeInfoIds(Long[] statusChangeInfoIds);
|
||||
|
||||
/**
|
||||
* 查询状态变化信息列表,根据productOrderId和planDetailId
|
||||
*
|
||||
* @param mesStatusChangeInfo 状态变化信息
|
||||
* @return 状态变化信息集合
|
||||
*/
|
||||
public List<MesStatusChangeInfo> selectMesStatusChangeInfoListByProduce(MesStatusChangeInfo mesStatusChangeInfo);
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
<?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.hw.mes.mapper.MesPrdBarcodeInfoMapper">
|
||||
|
||||
<resultMap type="MesPrdBarcodeInfo" id="MesPrdBarcodeInfoResult">
|
||||
<result property="prdBarcodeId" column="prd_barcode_id" />
|
||||
<result property="prdBarcodeInfo" column="prd_barcode_info" />
|
||||
<result property="printFlag" column="print_flag" />
|
||||
<result property="mesBarcodeInfo" column="mes_barcode_info" />
|
||||
<result property="palletInfoCode" column="pallet_info_code" />
|
||||
<result property="creatTime" column="creat_time" />
|
||||
<result property="printTime" column="print_time" />
|
||||
<result property="bindTime" column="bind_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesPrdBarcodeInfoVo">
|
||||
select prd_barcode_id, prd_barcode_info, print_flag, mes_barcode_info, pallet_info_code, creat_time, print_time, bind_time from mes_prd_barcode_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMesPrdBarcodeInfoList" parameterType="MesPrdBarcodeInfo" resultMap="MesPrdBarcodeInfoResult">
|
||||
<include refid="selectMesPrdBarcodeInfoVo"/>
|
||||
<where>
|
||||
<if test="prdBarcodeInfo != null and prdBarcodeInfo != ''"> and prd_barcode_info = #{prdBarcodeInfo}</if>
|
||||
<if test="printFlag != null and printFlag != ''"> and print_flag = #{printFlag}</if>
|
||||
<if test="mesBarcodeInfo != null and mesBarcodeInfo != ''"> and mes_barcode_info = #{mesBarcodeInfo}</if>
|
||||
<if test="palletInfoCode != null and palletInfoCode != ''"> and pallet_info_code = #{palletInfoCode}</if>
|
||||
<if test="creatTime != null "> and creat_time = #{creatTime}</if>
|
||||
<if test="printTime != null "> and print_time = #{printTime}</if>
|
||||
<if test="bindTime != null "> and bind_time = #{bindTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesPrdBarcodeInfoByPrdBarcodeId" parameterType="Long" resultMap="MesPrdBarcodeInfoResult">
|
||||
<include refid="selectMesPrdBarcodeInfoVo"/>
|
||||
where prd_barcode_id = #{prdBarcodeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesPrdBarcodeInfo" parameterType="MesPrdBarcodeInfo" useGeneratedKeys="true" keyProperty="prdBarcodeId">
|
||||
insert into mes_prd_barcode_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="prdBarcodeInfo != null and prdBarcodeInfo != ''">prd_barcode_info,</if>
|
||||
<if test="printFlag != null and printFlag != ''">print_flag,</if>
|
||||
<if test="mesBarcodeInfo != null">mes_barcode_info,</if>
|
||||
<if test="palletInfoCode != null">pallet_info_code,</if>
|
||||
<if test="creatTime != null">creat_time,</if>
|
||||
<if test="printTime != null">print_time,</if>
|
||||
<if test="bindTime != null">bind_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="prdBarcodeInfo != null and prdBarcodeInfo != ''">#{prdBarcodeInfo},</if>
|
||||
<if test="printFlag != null and printFlag != ''">#{printFlag},</if>
|
||||
<if test="mesBarcodeInfo != null">#{mesBarcodeInfo},</if>
|
||||
<if test="palletInfoCode != null">#{palletInfoCode},</if>
|
||||
<if test="creatTime != null">#{creatTime},</if>
|
||||
<if test="printTime != null">#{printTime},</if>
|
||||
<if test="bindTime != null">#{bindTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesPrdBarcodeInfo" parameterType="MesPrdBarcodeInfo">
|
||||
update mes_prd_barcode_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="prdBarcodeInfo != null and prdBarcodeInfo != ''">prd_barcode_info = #{prdBarcodeInfo},</if>
|
||||
<if test="printFlag != null and printFlag != ''">print_flag = #{printFlag},</if>
|
||||
<if test="mesBarcodeInfo != null">mes_barcode_info = #{mesBarcodeInfo},</if>
|
||||
<if test="palletInfoCode != null">pallet_info_code = #{palletInfoCode},</if>
|
||||
<if test="creatTime != null">creat_time = #{creatTime},</if>
|
||||
<if test="printTime != null">print_time = #{printTime},</if>
|
||||
<if test="bindTime != null">bind_time = #{bindTime},</if>
|
||||
</trim>
|
||||
where prd_barcode_id = #{prdBarcodeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesPrdBarcodeInfoByPrdBarcodeId" parameterType="Long">
|
||||
delete from mes_prd_barcode_info where prd_barcode_id = #{prdBarcodeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesPrdBarcodeInfoByPrdBarcodeIds" parameterType="String">
|
||||
delete from mes_prd_barcode_info where prd_barcode_id in
|
||||
<foreach item="prdBarcodeId" collection="array" open="(" separator="," close=")">
|
||||
#{prdBarcodeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,190 @@
|
||||
<?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.hw.mes.mapper.MesProduceStatisticsDetailMapper">
|
||||
|
||||
<resultMap type="MesProduceStatisticsDetail" id="MesProduceStatisticsDetailResult">
|
||||
<result property="statisticsDetailId" column="statistics_detail_id" />
|
||||
<result property="productOrderId" column="product_order_id" />
|
||||
<result property="saleOrderId" column="sale_order_id" />
|
||||
<result property="saleorderCode" column="saleorder_code" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="planDetailId" column="plan_detail_id" />
|
||||
<result property="planDetailCode" column="plan_detail_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="productSpec" column="product_spec" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="planBeginTime" column="plan_begin_time" />
|
||||
<result property="planEndTime" column="plan_end_time" />
|
||||
<result property="realBeginTime" column="real_begin_time" />
|
||||
<result property="realEndTime" column="real_end_time" />
|
||||
<result property="produceTime" column="produce_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="MesProduceStatisticsDetailMesProduceStatisticsDetailMaterialResult" type="MesProduceStatisticsDetail" extends="MesProduceStatisticsDetailResult">
|
||||
<collection property="mesProduceStatisticsDetailMaterialList" notNullColumn="sub_statistics_detail_material_id" javaType="java.util.List" resultMap="MesProduceStatisticsDetailMaterialResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="MesProduceStatisticsDetailMaterial" id="MesProduceStatisticsDetailMaterialResult">
|
||||
<result property="statisticsDetailMaterialId" column="sub_statistics_detail_material_id" />
|
||||
<result property="statisticsDetailId" column="sub_statistics_detail_id" />
|
||||
<result property="materialId" column="sub_material_id" />
|
||||
<result property="materialCode" column="sub_material_code" />
|
||||
<result property="materialName" column="sub_material_name" />
|
||||
<result property="materialSpec" column="sub_material_spec" />
|
||||
<result property="usedAmount" column="sub_used_amount" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesProduceStatisticsDetailVo">
|
||||
select statistics_detail_id, product_order_id, sale_order_id, saleorder_code, plan_id, plan_code, plan_detail_id, plan_detail_code, product_id, product_code, product_name, product_spec, user_id, nick_name, process_id, process_name, plan_begin_time, plan_end_time, real_begin_time, real_end_time, produce_time, create_time from mes_produce_statistics_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectMesProduceStatisticsDetailList" parameterType="MesProduceStatisticsDetail" resultMap="MesProduceStatisticsDetailResult">
|
||||
<include refid="selectMesProduceStatisticsDetailVo"/>
|
||||
<where>
|
||||
<if test="productOrderId != null "> and product_order_id = #{productOrderId}</if>
|
||||
<if test="saleOrderId != null "> and sale_order_id = #{saleOrderId}</if>
|
||||
<if test="saleorderCode != null and saleorderCode != ''"> and saleorder_code = #{saleorderCode}</if>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="planDetailId != null "> and plan_detail_id = #{planDetailId}</if>
|
||||
<if test="planDetailCode != null and planDetailCode != ''"> and plan_detail_code = #{planDetailCode}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="productSpec != null and productSpec != ''"> and product_spec = #{productSpec}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="planBeginTime != null "> and plan_begin_time = #{planBeginTime}</if>
|
||||
<if test="planEndTime != null "> and plan_end_time = #{planEndTime}</if>
|
||||
<if test="realBeginTime != null "> and real_begin_time = #{realBeginTime}</if>
|
||||
<if test="realEndTime != null "> and real_end_time = #{realEndTime}</if>
|
||||
<if test="produceTime != null "> and produce_time = #{produceTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesProduceStatisticsDetailByStatisticsDetailId" parameterType="Long" resultMap="MesProduceStatisticsDetailMesProduceStatisticsDetailMaterialResult">
|
||||
select a.statistics_detail_id, a.product_order_id, a.sale_order_id, a.saleorder_code, a.plan_id, a.plan_code, a.plan_detail_id, a.plan_detail_code, a.product_id, a.product_code, a.product_name, a.product_spec, a.user_id, a.nick_name, a.process_id, a.process_name, a.plan_begin_time, a.plan_end_time, a.real_begin_time, a.real_end_time, a.produce_time, a.create_time,
|
||||
b.statistics_detail_material_id as sub_statistics_detail_material_id, b.statistics_detail_id as sub_statistics_detail_id, b.material_id as sub_material_id, b.material_code as sub_material_code, b.material_name as sub_material_name, b.material_spec as sub_material_spec, b.used_amount as sub_used_amount
|
||||
from mes_produce_statistics_detail a
|
||||
left join mes_produce_statistics_detail_material b on b.statistics_detail_id = a.statistics_detail_id
|
||||
where a.statistics_detail_id = #{statisticsDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesProduceStatisticsDetail" parameterType="MesProduceStatisticsDetail" useGeneratedKeys="true" keyProperty="statisticsDetailId">
|
||||
insert into mes_produce_statistics_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productOrderId != null">product_order_id,</if>
|
||||
<if test="saleOrderId != null">sale_order_id,</if>
|
||||
<if test="saleorderCode != null">saleorder_code,</if>
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="planCode != null and planCode != ''">plan_code,</if>
|
||||
<if test="planDetailId != null">plan_detail_id,</if>
|
||||
<if test="planDetailCode != null and planDetailCode != ''">plan_detail_code,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productCode != null">product_code,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="productSpec != null">product_spec,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="processName != null">process_name,</if>
|
||||
<if test="planBeginTime != null">plan_begin_time,</if>
|
||||
<if test="planEndTime != null">plan_end_time,</if>
|
||||
<if test="realBeginTime != null">real_begin_time,</if>
|
||||
<if test="realEndTime != null">real_end_time,</if>
|
||||
<if test="produceTime != null">produce_time,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productOrderId != null">#{productOrderId},</if>
|
||||
<if test="saleOrderId != null">#{saleOrderId},</if>
|
||||
<if test="saleorderCode != null">#{saleorderCode},</if>
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="planCode != null and planCode != ''">#{planCode},</if>
|
||||
<if test="planDetailId != null">#{planDetailId},</if>
|
||||
<if test="planDetailCode != null and planDetailCode != ''">#{planDetailCode},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productCode != null">#{productCode},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="productSpec != null">#{productSpec},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="processName != null">#{processName},</if>
|
||||
<if test="planBeginTime != null">#{planBeginTime},</if>
|
||||
<if test="planEndTime != null">#{planEndTime},</if>
|
||||
<if test="realBeginTime != null">#{realBeginTime},</if>
|
||||
<if test="realEndTime != null">#{realEndTime},</if>
|
||||
<if test="produceTime != null">#{produceTime},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesProduceStatisticsDetail" parameterType="MesProduceStatisticsDetail">
|
||||
update mes_produce_statistics_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productOrderId != null">product_order_id = #{productOrderId},</if>
|
||||
<if test="saleOrderId != null">sale_order_id = #{saleOrderId},</if>
|
||||
<if test="saleorderCode != null">saleorder_code = #{saleorderCode},</if>
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>
|
||||
<if test="planDetailId != null">plan_detail_id = #{planDetailId},</if>
|
||||
<if test="planDetailCode != null and planDetailCode != ''">plan_detail_code = #{planDetailCode},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productCode != null">product_code = #{productCode},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="productSpec != null">product_spec = #{productSpec},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="processName != null">process_name = #{processName},</if>
|
||||
<if test="planBeginTime != null">plan_begin_time = #{planBeginTime},</if>
|
||||
<if test="planEndTime != null">plan_end_time = #{planEndTime},</if>
|
||||
<if test="realBeginTime != null">real_begin_time = #{realBeginTime},</if>
|
||||
<if test="realEndTime != null">real_end_time = #{realEndTime},</if>
|
||||
<if test="produceTime != null">produce_time = #{produceTime},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where statistics_detail_id = #{statisticsDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesProduceStatisticsDetailByStatisticsDetailId" parameterType="Long">
|
||||
delete from mes_produce_statistics_detail where statistics_detail_id = #{statisticsDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesProduceStatisticsDetailByStatisticsDetailIds" parameterType="String">
|
||||
delete from mes_produce_statistics_detail where statistics_detail_id in
|
||||
<foreach item="statisticsDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{statisticsDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesProduceStatisticsDetailMaterialByStatisticsDetailIds" parameterType="String">
|
||||
delete from mes_produce_statistics_detail_material where statistics_detail_id in
|
||||
<foreach item="statisticsDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{statisticsDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesProduceStatisticsDetailMaterialByStatisticsDetailId" parameterType="Long">
|
||||
delete from mes_produce_statistics_detail_material where statistics_detail_id = #{statisticsDetailId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchMesProduceStatisticsDetailMaterial">
|
||||
insert into mes_produce_statistics_detail_material( statistics_detail_material_id, statistics_detail_id, material_id, material_code, material_name, material_spec, used_amount) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.statisticsDetailMaterialId}, #{item.statisticsDetailId}, #{item.materialId}, #{item.materialCode}, #{item.materialName}, #{item.materialSpec}, #{item.usedAmount})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,89 @@
|
||||
<?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.hw.mes.mapper.MesStatusChangeInfoMapper">
|
||||
|
||||
<resultMap type="MesStatusChangeInfo" id="MesStatusChangeInfoResult">
|
||||
<result property="statusChangeInfoId" column="status_change_info_id" />
|
||||
<result property="changeType" column="change_type" />
|
||||
<result property="changeId" column="change_id" />
|
||||
<result property="oldStatus" column="old_status" />
|
||||
<result property="newStatus" column="new_status" />
|
||||
<result property="changeBy" column="change_by" />
|
||||
<result property="changeTime" column="change_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesStatusChangeInfoVo">
|
||||
select status_change_info_id, change_type, change_id, old_status, new_status, change_by, change_time from mes_status_change_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMesStatusChangeInfoList" parameterType="MesStatusChangeInfo" resultMap="MesStatusChangeInfoResult">
|
||||
<include refid="selectMesStatusChangeInfoVo"/>
|
||||
<where>
|
||||
<if test="changeType != null and changeType != ''"> and change_type = #{changeType}</if>
|
||||
<if test="changeId != null "> and change_id = #{changeId}</if>
|
||||
<if test="oldStatus != null and oldStatus != ''"> and old_status = #{oldStatus}</if>
|
||||
<if test="newStatus != null and newStatus != ''"> and new_status = #{newStatus}</if>
|
||||
<if test="changeBy != null and changeBy != ''"> and change_by = #{changeBy}</if>
|
||||
<if test="changeTime != null "> and change_time = #{changeTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesStatusChangeInfoByStatusChangeInfoId" parameterType="Long" resultMap="MesStatusChangeInfoResult">
|
||||
<include refid="selectMesStatusChangeInfoVo"/>
|
||||
where status_change_info_id = #{statusChangeInfoId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesStatusChangeInfo" parameterType="MesStatusChangeInfo" useGeneratedKeys="true" keyProperty="statusChangeInfoId">
|
||||
insert into mes_status_change_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="changeType != null and changeType != ''">change_type,</if>
|
||||
<if test="changeId != null">change_id,</if>
|
||||
<if test="oldStatus != null">old_status,</if>
|
||||
<if test="newStatus != null and newStatus != ''">new_status,</if>
|
||||
<if test="changeBy != null">change_by,</if>
|
||||
<if test="changeTime != null">change_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="changeType != null and changeType != ''">#{changeType},</if>
|
||||
<if test="changeId != null">#{changeId},</if>
|
||||
<if test="oldStatus != null">#{oldStatus},</if>
|
||||
<if test="newStatus != null and newStatus != ''">#{newStatus},</if>
|
||||
<if test="changeBy != null">#{changeBy},</if>
|
||||
<if test="changeTime != null">#{changeTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMesStatusChangeInfo" parameterType="MesStatusChangeInfo">
|
||||
update mes_status_change_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="changeType != null and changeType != ''">change_type = #{changeType},</if>
|
||||
<if test="changeId != null">change_id = #{changeId},</if>
|
||||
<if test="oldStatus != null">old_status = #{oldStatus},</if>
|
||||
<if test="newStatus != null and newStatus != ''">new_status = #{newStatus},</if>
|
||||
<if test="changeBy != null">change_by = #{changeBy},</if>
|
||||
<if test="changeTime != null">change_time = #{changeTime},</if>
|
||||
</trim>
|
||||
where status_change_info_id = #{statusChangeInfoId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesStatusChangeInfoByStatusChangeInfoId" parameterType="Long">
|
||||
delete from mes_status_change_info where status_change_info_id = #{statusChangeInfoId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesStatusChangeInfoByStatusChangeInfoIds" parameterType="String">
|
||||
delete from mes_status_change_info where status_change_info_id in
|
||||
<foreach item="statusChangeInfoId" collection="array" open="(" separator="," close=")">
|
||||
#{statusChangeInfoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<select id="selectMesStatusChangeInfoListByProduce" parameterType="MesStatusChangeInfo" resultMap="MesStatusChangeInfoResult">
|
||||
select status_change_info_id, change_type, change_id, old_status, new_status, change_by, change_time from mes_status_change_info
|
||||
where (change_type='1' and change_id=#{productOrderId}) or (change_type='2' and change_id=#{planDetailId})
|
||||
order by change_time
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="relateSaleOrderList">
|
||||
<el-table-column label="销售订单号" align="center" prop="relateSaleOrderCode"/>
|
||||
<el-table-column label="物料编码" align="center" prop="productCode"/>
|
||||
<el-table-column label="物料名称" align="center" prop="productName"/>
|
||||
<el-table-column label="物料规格" align="center" prop="productSpec"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="relateQueryParams.pageNum"
|
||||
:limit.sync="relateQueryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { selectSaleOrderRelates } from "@/api/mes/saleOrder";
|
||||
|
||||
export default {
|
||||
name: "SaleOrderRelates",
|
||||
props: {
|
||||
defineData: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
inject: ['closeDialog'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
relateSaleOrderList:[],
|
||||
// 选中数组
|
||||
relateQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
if (this.defineData.virtualMaterialId) {
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
|
||||
/** 查询销售订单信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.relateQueryParams.selectFlag = null;
|
||||
this.relateQueryParams.relateFlag = "1";
|
||||
this.relateQueryParams.virtualMaterialId = this.defineData.virtualMaterialId;
|
||||
selectSaleOrderRelates(this.relateQueryParams).then(response => {
|
||||
this.relateSaleOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
||||
|
||||
.el-table {
|
||||
background-color: #fff0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
.roundBorder {
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
|
||||
</style>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue