change - add订单信息

main
yinq 6 months ago
parent cda1fc94a7
commit 8807a30867

@ -0,0 +1,100 @@
package com.os.mes.prod.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.os.common.annotation.Log;
import com.os.common.core.controller.BaseController;
import com.os.common.core.domain.AjaxResult;
import com.os.common.enums.BusinessType;
import com.os.mes.prod.domain.ProdOrderInfo;
import com.os.mes.prod.service.IProdOrderInfoService;
import com.os.common.utils.poi.ExcelUtil;
import com.os.common.core.page.TableDataInfo;
/**
* Controller
*
* @author Yinq
* @date 2024-05-17
*/
@RestController
@RequestMapping("/mes/prod/prodOrderInfo")
public class ProdOrderInfoController extends BaseController {
@Autowired
private IProdOrderInfoService prodOrderInfoService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/prod:prodOrderInfo:list')")
@GetMapping("/list")
public TableDataInfo list(ProdOrderInfo prodOrderInfo) {
startPage();
List<ProdOrderInfo> list = prodOrderInfoService.selectProdOrderInfoList(prodOrderInfo);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/prod:prodOrderInfo:export')")
@Log(title = "订单信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProdOrderInfo prodOrderInfo) {
List<ProdOrderInfo> list = prodOrderInfoService.selectProdOrderInfoList(prodOrderInfo);
ExcelUtil<ProdOrderInfo> util = new ExcelUtil<ProdOrderInfo>(ProdOrderInfo.class);
util.exportExcel(response, list, "订单信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/prod:prodOrderInfo:query')")
@GetMapping(value = "/{objId}")
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
return success(prodOrderInfoService.selectProdOrderInfoByObjId(objId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/prod:prodOrderInfo:add')")
@Log(title = "订单信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ProdOrderInfo prodOrderInfo) {
prodOrderInfo.setCreateBy(getUsername());
return toAjax(prodOrderInfoService.insertProdOrderInfo(prodOrderInfo));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/prod:prodOrderInfo:edit')")
@Log(title = "订单信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ProdOrderInfo prodOrderInfo) {
prodOrderInfo.setUpdateBy(getUsername());
return toAjax(prodOrderInfoService.updateProdOrderInfo(prodOrderInfo));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('mes/prod:prodOrderInfo:remove')")
@Log(title = "订单信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}")
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(prodOrderInfoService.deleteProdOrderInfoByObjIds(objIds));
}
}

@ -0,0 +1,435 @@
package com.os.mes.prod.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.os.common.annotation.Excel;
import com.os.common.core.domain.BaseEntity;
/**
* prod_order_info
*
* @author Yinq
* @date 2024-05-17
*/
public class ProdOrderInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
*
*/
@Excel(name = "订单编号")
private String orderCode;
/**
*
*/
@Excel(name = "销售订单编号")
private String saleOrderCode;
/**
*
*/
@Excel(name = "销售订单行号")
private String saleOrderLineNumber;
/**
*
*/
@Excel(name = "物料编码")
private String materialCode;
/**
*
*/
@Excel(name = "物料名称")
private String materialName;
/**
*
*/
@Excel(name = "物料组")
private String matkl;
/**
* BOM
*/
@Excel(name = "BOM编号")
private String bomCode;
/**
*
*/
@Excel(name = "订单计划数量")
private Long orderAmount;
/**
*
*/
@Excel(name = "完成数量")
private Long completeAmount;
/**
*
*/
@Excel(name = "工单类型")
private String orderType;
/**
* 0 1 2 3
*/
@Excel(name = "工单状态", readConverterExp = "0=未开始,1=执行中,2=执行完成,3=取消")
private String orderStatus;
/**
* 0=1=2=
*/
@Excel(name = "完成标识", readConverterExp = "0==正常1=降级2=超额")
private String finishFlag;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date beginDate;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date endDate;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date realBeginDate;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实际完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date realEndDate;
/**
*
*/
@Excel(name = "工厂编号")
private String factoryCode;
/**
* 0-1-
*/
@Excel(name = "是否已下达计划", readConverterExp = "0=-是1-否")
private String isRelease;
/**
*
*/
@Excel(name = "工作中心")
private String workCenterCode;
/**
* 线
*/
@Excel(name = "工艺路线")
private String routingCode;
/**
*
*/
@Excel(name = "打印名称")
private String printName;
/**
*
*/
@Excel(name = "预留标识")
private String isFlag;
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setOrderCode(String orderCode) {
this.orderCode = orderCode;
}
public String getOrderCode() {
return orderCode;
}
public void setSaleOrderCode(String saleOrderCode) {
this.saleOrderCode = saleOrderCode;
}
public String getSaleOrderCode() {
return saleOrderCode;
}
public void setSaleOrderLineNumber(String saleOrderLineNumber) {
this.saleOrderLineNumber = saleOrderLineNumber;
}
public String getSaleOrderLineNumber() {
return saleOrderLineNumber;
}
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 setMatkl(String matkl) {
this.matkl = matkl;
}
public String getMatkl() {
return matkl;
}
public void setBomCode(String bomCode) {
this.bomCode = bomCode;
}
public String getBomCode() {
return bomCode;
}
public void setOrderAmount(Long orderAmount) {
this.orderAmount = orderAmount;
}
public Long getOrderAmount() {
return orderAmount;
}
public void setCompleteAmount(Long completeAmount) {
this.completeAmount = completeAmount;
}
public Long getCompleteAmount() {
return completeAmount;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
public String getOrderType() {
return orderType;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public String getOrderStatus() {
return orderStatus;
}
public void setFinishFlag(String finishFlag) {
this.finishFlag = finishFlag;
}
public String getFinishFlag() {
return finishFlag;
}
public void setBeginDate(Date beginDate) {
this.beginDate = beginDate;
}
public Date getBeginDate() {
return beginDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public Date getEndDate() {
return endDate;
}
public void setRealBeginDate(Date realBeginDate) {
this.realBeginDate = realBeginDate;
}
public Date getRealBeginDate() {
return realBeginDate;
}
public void setRealEndDate(Date realEndDate) {
this.realEndDate = realEndDate;
}
public Date getRealEndDate() {
return realEndDate;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
}
public void setIsRelease(String isRelease) {
this.isRelease = isRelease;
}
public String getIsRelease() {
return isRelease;
}
public void setWorkCenterCode(String workCenterCode) {
this.workCenterCode = workCenterCode;
}
public String getWorkCenterCode() {
return workCenterCode;
}
public void setRoutingCode(String routingCode) {
this.routingCode = routingCode;
}
public String getRoutingCode() {
return routingCode;
}
public void setPrintName(String printName) {
this.printName = printName;
}
public String getPrintName() {
return printName;
}
public void setIsFlag(String isFlag) {
this.isFlag = isFlag;
}
public String getIsFlag() {
return isFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Date getCreatedTime() {
return createdTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
}
public Date getUpdatedTime() {
return updatedTime;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("orderCode", getOrderCode())
.append("saleOrderCode", getSaleOrderCode())
.append("saleOrderLineNumber", getSaleOrderLineNumber())
.append("materialCode", getMaterialCode())
.append("materialName", getMaterialName())
.append("matkl", getMatkl())
.append("bomCode", getBomCode())
.append("orderAmount", getOrderAmount())
.append("completeAmount", getCompleteAmount())
.append("orderType", getOrderType())
.append("orderStatus", getOrderStatus())
.append("finishFlag", getFinishFlag())
.append("beginDate", getBeginDate())
.append("endDate", getEndDate())
.append("realBeginDate", getRealBeginDate())
.append("realEndDate", getRealEndDate())
.append("factoryCode", getFactoryCode())
.append("isRelease", getIsRelease())
.append("workCenterCode", getWorkCenterCode())
.append("routingCode", getRoutingCode())
.append("printName", getPrintName())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.toString();
}
}

@ -0,0 +1,61 @@
package com.os.mes.prod.mapper;
import java.util.List;
import com.os.mes.prod.domain.ProdOrderInfo;
/**
* Mapper
*
* @author Yinq
* @date 2024-05-17
*/
public interface ProdOrderInfoMapper {
/**
*
*
* @param objId
* @return
*/
public ProdOrderInfo selectProdOrderInfoByObjId(Long objId);
/**
*
*
* @param prodOrderInfo
* @return
*/
public List<ProdOrderInfo> selectProdOrderInfoList(ProdOrderInfo prodOrderInfo);
/**
*
*
* @param prodOrderInfo
* @return
*/
public int insertProdOrderInfo(ProdOrderInfo prodOrderInfo);
/**
*
*
* @param prodOrderInfo
* @return
*/
public int updateProdOrderInfo(ProdOrderInfo prodOrderInfo);
/**
*
*
* @param objId
* @return
*/
public int deleteProdOrderInfoByObjId(Long objId);
/**
*
*
* @param objIds
* @return
*/
public int deleteProdOrderInfoByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.os.mes.prod.service;
import java.util.List;
import com.os.mes.prod.domain.ProdOrderInfo;
/**
* Service
*
* @author Yinq
* @date 2024-05-17
*/
public interface IProdOrderInfoService {
/**
*
*
* @param objId
* @return
*/
public ProdOrderInfo selectProdOrderInfoByObjId(Long objId);
/**
*
*
* @param prodOrderInfo
* @return
*/
public List<ProdOrderInfo> selectProdOrderInfoList(ProdOrderInfo prodOrderInfo);
/**
*
*
* @param prodOrderInfo
* @return
*/
public int insertProdOrderInfo(ProdOrderInfo prodOrderInfo);
/**
*
*
* @param prodOrderInfo
* @return
*/
public int updateProdOrderInfo(ProdOrderInfo prodOrderInfo);
/**
*
*
* @param objIds
* @return
*/
public int deleteProdOrderInfoByObjIds(Long[] objIds);
/**
*
*
* @param objId
* @return
*/
public int deleteProdOrderInfoByObjId(Long objId);
}

@ -0,0 +1,87 @@
package com.os.mes.prod.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.os.mes.prod.mapper.ProdOrderInfoMapper;
import com.os.mes.prod.domain.ProdOrderInfo;
import com.os.mes.prod.service.IProdOrderInfoService;
/**
* Service
*
* @author Yinq
* @date 2024-05-17
*/
@Service
public class ProdOrderInfoServiceImpl implements IProdOrderInfoService {
@Autowired
private ProdOrderInfoMapper prodOrderInfoMapper;
/**
*
*
* @param objId
* @return
*/
@Override
public ProdOrderInfo selectProdOrderInfoByObjId(Long objId) {
return prodOrderInfoMapper.selectProdOrderInfoByObjId(objId);
}
/**
*
*
* @param prodOrderInfo
* @return
*/
@Override
public List<ProdOrderInfo> selectProdOrderInfoList(ProdOrderInfo prodOrderInfo) {
return prodOrderInfoMapper.selectProdOrderInfoList(prodOrderInfo);
}
/**
*
*
* @param prodOrderInfo
* @return
*/
@Override
public int insertProdOrderInfo(ProdOrderInfo prodOrderInfo) {
return prodOrderInfoMapper.insertProdOrderInfo(prodOrderInfo);
}
/**
*
*
* @param prodOrderInfo
* @return
*/
@Override
public int updateProdOrderInfo(ProdOrderInfo prodOrderInfo) {
return prodOrderInfoMapper.updateProdOrderInfo(prodOrderInfo);
}
/**
*
*
* @param objIds
* @return
*/
@Override
public int deleteProdOrderInfoByObjIds(Long[] objIds) {
return prodOrderInfoMapper.deleteProdOrderInfoByObjIds(objIds);
}
/**
*
*
* @param objId
* @return
*/
@Override
public int deleteProdOrderInfoByObjId(Long objId) {
return prodOrderInfoMapper.deleteProdOrderInfoByObjId(objId);
}
}

@ -0,0 +1,216 @@
<?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.os.mes.prod.mapper.ProdOrderInfoMapper">
<resultMap type="ProdOrderInfo" id="ProdOrderInfoResult">
<result property="objId" column="obj_id"/>
<result property="orderCode" column="order_code"/>
<result property="saleOrderCode" column="sale_order_code"/>
<result property="saleOrderLineNumber" column="sale_order_line_number"/>
<result property="materialCode" column="material_code"/>
<result property="materialName" column="material_name"/>
<result property="matkl" column="matkl"/>
<result property="bomCode" column="bom_code"/>
<result property="orderAmount" column="order_amount"/>
<result property="completeAmount" column="complete_amount"/>
<result property="orderType" column="order_type"/>
<result property="orderStatus" column="order_status"/>
<result property="finishFlag" column="finish_flag"/>
<result property="beginDate" column="begin_date"/>
<result property="endDate" column="end_date"/>
<result property="realBeginDate" column="real_begin_date"/>
<result property="realEndDate" column="real_end_date"/>
<result property="factoryCode" column="factory_code"/>
<result property="isRelease" column="is_release"/>
<result property="workCenterCode" column="work_center_code"/>
<result property="routingCode" column="routing_code"/>
<result property="printName" column="print_name"/>
<result property="isFlag" column="is_flag"/>
<result property="createdBy" column="created_by"/>
<result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
</resultMap>
<sql id="selectProdOrderInfoVo">
select obj_id,
order_code,
sale_order_code,
sale_order_line_number,
material_code,
material_name,
matkl,
bom_code,
order_amount,
complete_amount,
order_type,
order_status,
finish_flag,
begin_date,
end_date,
real_begin_date,
real_end_date,
factory_code,
is_release,
work_center_code,
routing_code,
print_name,
is_flag,
created_by,
created_time,
updated_by,
updated_time
from prod_order_info
</sql>
<select id="selectProdOrderInfoList" parameterType="ProdOrderInfo" resultMap="ProdOrderInfoResult">
<include refid="selectProdOrderInfoVo"/>
<where>
<if test="orderCode != null and orderCode != ''">and order_code = #{orderCode}</if>
<if test="saleOrderCode != null and saleOrderCode != ''">and sale_order_code = #{saleOrderCode}</if>
<if test="saleOrderLineNumber != null and saleOrderLineNumber != ''">and sale_order_line_number =
#{saleOrderLineNumber}
</if>
<if test="materialCode != null and materialCode != ''">and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''">and material_name like concat('%', #{materialName},
'%')
</if>
<if test="matkl != null and matkl != ''">and matkl = #{matkl}</if>
<if test="bomCode != null and bomCode != ''">and bom_code = #{bomCode}</if>
<if test="orderAmount != null ">and order_amount = #{orderAmount}</if>
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
<if test="orderType != null and orderType != ''">and order_type = #{orderType}</if>
<if test="orderStatus != null and orderStatus != ''">and order_status = #{orderStatus}</if>
<if test="finishFlag != null and finishFlag != ''">and finish_flag = #{finishFlag}</if>
<if test="params.beginBeginDate != null and params.beginBeginDate != '' and params.endBeginDate != null and params.endBeginDate != ''">
and begin_date between #{params.beginBeginDate} and #{params.endBeginDate}
</if>
<if test="endDate != null ">and end_date = #{endDate}</if>
<if test="realBeginDate != null ">and real_begin_date = #{realBeginDate}</if>
<if test="realEndDate != null ">and real_end_date = #{realEndDate}</if>
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
<if test="isRelease != null and isRelease != ''">and is_release = #{isRelease}</if>
<if test="workCenterCode != null and workCenterCode != ''">and work_center_code = #{workCenterCode}</if>
<if test="routingCode != null and routingCode != ''">and routing_code = #{routingCode}</if>
<if test="printName != null and printName != ''">and print_name like concat('%', #{printName}, '%')</if>
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
<if test="createdTime != null ">and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
</where>
</select>
<select id="selectProdOrderInfoByObjId" parameterType="Long" resultMap="ProdOrderInfoResult">
<include refid="selectProdOrderInfoVo"/>
where obj_id = #{objId}
</select>
<insert id="insertProdOrderInfo" parameterType="ProdOrderInfo" useGeneratedKeys="true" keyProperty="objId">
insert into prod_order_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderCode != null">order_code,</if>
<if test="saleOrderCode != null">sale_order_code,</if>
<if test="saleOrderLineNumber != null">sale_order_line_number,</if>
<if test="materialCode != null">material_code,</if>
<if test="materialName != null">material_name,</if>
<if test="matkl != null">matkl,</if>
<if test="bomCode != null">bom_code,</if>
<if test="orderAmount != null">order_amount,</if>
<if test="completeAmount != null">complete_amount,</if>
<if test="orderType != null">order_type,</if>
<if test="orderStatus != null">order_status,</if>
<if test="finishFlag != null">finish_flag,</if>
<if test="beginDate != null">begin_date,</if>
<if test="endDate != null">end_date,</if>
<if test="realBeginDate != null">real_begin_date,</if>
<if test="realEndDate != null">real_end_date,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="isRelease != null">is_release,</if>
<if test="workCenterCode != null">work_center_code,</if>
<if test="routingCode != null">routing_code,</if>
<if test="printName != null">print_name,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderCode != null">#{orderCode},</if>
<if test="saleOrderCode != null">#{saleOrderCode},</if>
<if test="saleOrderLineNumber != null">#{saleOrderLineNumber},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="materialName != null">#{materialName},</if>
<if test="matkl != null">#{matkl},</if>
<if test="bomCode != null">#{bomCode},</if>
<if test="orderAmount != null">#{orderAmount},</if>
<if test="completeAmount != null">#{completeAmount},</if>
<if test="orderType != null">#{orderType},</if>
<if test="orderStatus != null">#{orderStatus},</if>
<if test="finishFlag != null">#{finishFlag},</if>
<if test="beginDate != null">#{beginDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="realBeginDate != null">#{realBeginDate},</if>
<if test="realEndDate != null">#{realEndDate},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="isRelease != null">#{isRelease},</if>
<if test="workCenterCode != null">#{workCenterCode},</if>
<if test="routingCode != null">#{routingCode},</if>
<if test="printName != null">#{printName},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
</trim>
</insert>
<update id="updateProdOrderInfo" parameterType="ProdOrderInfo">
update prod_order_info
<trim prefix="SET" suffixOverrides=",">
<if test="orderCode != null">order_code = #{orderCode},</if>
<if test="saleOrderCode != null">sale_order_code = #{saleOrderCode},</if>
<if test="saleOrderLineNumber != null">sale_order_line_number = #{saleOrderLineNumber},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="matkl != null">matkl = #{matkl},</if>
<if test="bomCode != null">bom_code = #{bomCode},</if>
<if test="orderAmount != null">order_amount = #{orderAmount},</if>
<if test="completeAmount != null">complete_amount = #{completeAmount},</if>
<if test="orderType != null">order_type = #{orderType},</if>
<if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="finishFlag != null">finish_flag = #{finishFlag},</if>
<if test="beginDate != null">begin_date = #{beginDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="realBeginDate != null">real_begin_date = #{realBeginDate},</if>
<if test="realEndDate != null">real_end_date = #{realEndDate},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="isRelease != null">is_release = #{isRelease},</if>
<if test="workCenterCode != null">work_center_code = #{workCenterCode},</if>
<if test="routingCode != null">routing_code = #{routingCode},</if>
<if test="printName != null">print_name = #{printName},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteProdOrderInfoByObjId" parameterType="Long">
delete
from prod_order_info
where obj_id = #{objId}
</delete>
<delete id="deleteProdOrderInfoByObjIds" parameterType="String">
delete from prod_order_info where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save