change - add订单信息
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,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…
Reference in New Issue