¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.controller.mainPlan; |
| | | |
| | | import com.aps.common.core.utils.poi.ExcelUtil; |
| | | import com.aps.common.core.web.controller.BaseController; |
| | | import com.aps.common.core.web.domain.AjaxResult; |
| | | import com.aps.common.core.web.page.TableDataInfo; |
| | | import com.aps.common.log.annotation.Log; |
| | | import com.aps.common.log.enums.BusinessType; |
| | | import com.aps.common.security.annotation.RequiresPermissions; |
| | | import com.aps.core.domain.ApsBomHeader; |
| | | import com.aps.core.service.IApsBomHeaderService; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * BOM Header æ°æ®ç®¡çController |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-06 |
| | | */ |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/ApsBomHeader") |
| | | public class ApsBomHeaderController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IApsBomHeaderService apsBomHeaderService; |
| | | |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡çå表 |
| | | */ |
| | | |
| | | @RequiresPermissions("ApsBomHeader:ApsBomHeader:list") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ApsBomHeader apsBomHeader) |
| | | { |
| | | startPage(); |
| | | List<ApsBomHeader> list = apsBomHeaderService.selectApsBomHeaderList(apsBomHeader); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºBOM Header æ°æ®ç®¡çå表 |
| | | */ |
| | | |
| | | @RequiresPermissions("ApsBomHeader:ApsBomHeader:export") |
| | | @Log(title = "BOM Header æ°æ®ç®¡ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ApsBomHeader apsBomHeader) |
| | | { |
| | | List<ApsBomHeader> list = apsBomHeaderService.selectApsBomHeaderList(apsBomHeader); |
| | | ExcelUtil<ApsBomHeader> util = new ExcelUtil<ApsBomHeader>(ApsBomHeader.class); |
| | | util.exportExcel(response, list, "BOM Header æ°æ®ç®¡çæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åBOM Header æ°æ®ç®¡ç详ç»ä¿¡æ¯ |
| | | */ |
| | | |
| | | @RequiresPermissions("ApsBomHeader:ApsBomHeader:query") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(apsBomHeaderService.selectApsBomHeaderById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | |
| | | @RequiresPermissions("ApsBomHeader:ApsBomHeader:add") |
| | | @Log(title = "BOM Header æ°æ®ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ApsBomHeader apsBomHeader) |
| | | { |
| | | return toAjax(apsBomHeaderService.insertApsBomHeader(apsBomHeader)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | |
| | | @RequiresPermissions("ApsBomHeader:ApsBomHeader:edit") |
| | | @Log(title = "BOM Header æ°æ®ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ApsBomHeader apsBomHeader) |
| | | { |
| | | return toAjax(apsBomHeaderService.updateApsBomHeader(apsBomHeader)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | |
| | | @RequiresPermissions("ApsBomHeader:ApsBomHeader:remove") |
| | | @Log(title = "BOM Header æ°æ®ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(apsBomHeaderService.deleteApsBomHeaderByIds(ids)); |
| | | } |
| | | } |
| | |
| | | |
| | | /** bomID */ |
| | | @Excel(name = "bomID") |
| | | private String bomId; |
| | | private String bomLineId; |
| | | |
| | | /** ç¶èç¹BOM ID */ |
| | | @Excel(name = "ç¶èç¹BOM ID") |
| | | private String parentBomId; |
| | | private String bomHeaderId; |
| | | |
| | | /** æå· */ |
| | | @Excel(name = "æå·") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serial; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * BOM Header æ°æ®ç®¡ç对象 aps_bom_header |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-06 |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | public class ApsBomHeader extends BaseEntity |
| | | { |
| | | @Serial |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®ID */ |
| | | private Long id; |
| | | |
| | | /** bomHeaderId */ |
| | | @Excel(name = "bomHeaderId") |
| | | private String bomHeaderId; |
| | | |
| | | /** æå· */ |
| | | @Excel(name = "æå·") |
| | | private String itemCode; |
| | | |
| | | /** ç©ææè¿° */ |
| | | @Excel(name = "ç©ææè¿°") |
| | | private String itemName; |
| | | |
| | | /** çææ¥æ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "çææ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date startDate; |
| | | |
| | | /** å¤±ææ¥æ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "å¤±ææ¥æ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | /** å·¥åç¼ç */ |
| | | @Excel(name = "å·¥åç¼ç ") |
| | | private String orgCode; |
| | | |
| | | /** å 餿 å¿ï¼0代表åå¨ 2代表å é¤ï¼ */ |
| | | private String delFlag; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsBomHeader; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * BOM Header æ°æ®ç®¡çMapperæ¥å£ |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-06 |
| | | */ |
| | | @Mapper |
| | | public interface ApsBomHeaderMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param id BOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | public ApsBomHeader selectApsBomHeaderById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡çå表 |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return BOM Header æ°æ®ç®¡çéå |
| | | */ |
| | | public List<ApsBomHeader> selectApsBomHeaderList(ApsBomHeader apsBomHeader); |
| | | |
| | | /** |
| | | * æ°å¢BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsBomHeader(ApsBomHeader apsBomHeader); |
| | | |
| | | /** |
| | | * ä¿®æ¹BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsBomHeader(ApsBomHeader apsBomHeader); |
| | | |
| | | /** |
| | | * å é¤BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param id BOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsBomHeaderById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsBomHeaderByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service; |
| | | |
| | | import java.util.List; |
| | | import com.aps.core.domain.ApsBomHeader; |
| | | |
| | | /** |
| | | * BOM Header æ°æ®ç®¡çServiceæ¥å£ |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-06 |
| | | */ |
| | | public interface IApsBomHeaderService |
| | | { |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param id BOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | public ApsBomHeader selectApsBomHeaderById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡çå表 |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return BOM Header æ°æ®ç®¡çéå |
| | | */ |
| | | public List<ApsBomHeader> selectApsBomHeaderList(ApsBomHeader apsBomHeader); |
| | | |
| | | /** |
| | | * æ°å¢BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int insertApsBomHeader(ApsBomHeader apsBomHeader); |
| | | |
| | | /** |
| | | * ä¿®æ¹BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int updateApsBomHeader(ApsBomHeader apsBomHeader); |
| | | |
| | | /** |
| | | * æ¹éå é¤BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çBOM Header æ°æ®ç®¡ç主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsBomHeaderByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤BOM Header æ°æ®ç®¡çä¿¡æ¯ |
| | | * |
| | | * @param id BOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteApsBomHeaderById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsBomHeaderMapper; |
| | | import com.aps.core.domain.ApsBomHeader; |
| | | import com.aps.core.service.IApsBomHeaderService; |
| | | |
| | | /** |
| | | * BOM Header æ°æ®ç®¡çServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author zhl |
| | | * @date 2025-05-06 |
| | | */ |
| | | @Service |
| | | public class ApsBomHeaderServiceImpl implements IApsBomHeaderService |
| | | { |
| | | @Autowired |
| | | private ApsBomHeaderMapper apsBomHeaderMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param id BOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | @Override |
| | | public ApsBomHeader selectApsBomHeaderById(Long id) |
| | | { |
| | | return apsBomHeaderMapper.selectApsBomHeaderById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢BOM Header æ°æ®ç®¡çå表 |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return BOM Header æ°æ®ç®¡ç |
| | | */ |
| | | @Override |
| | | public List<ApsBomHeader> selectApsBomHeaderList(ApsBomHeader apsBomHeader) |
| | | { |
| | | return apsBomHeaderMapper.selectApsBomHeaderList(apsBomHeader); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertApsBomHeader(ApsBomHeader apsBomHeader) |
| | | { |
| | | apsBomHeader.setCreateTime(DateUtils.getNowDate()); |
| | | return apsBomHeaderMapper.insertApsBomHeader(apsBomHeader); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param apsBomHeader BOM Header æ°æ®ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateApsBomHeader(ApsBomHeader apsBomHeader) |
| | | { |
| | | apsBomHeader.setUpdateTime(DateUtils.getNowDate()); |
| | | return apsBomHeaderMapper.updateApsBomHeader(apsBomHeader); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤BOM Header æ°æ®ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çBOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsBomHeaderByIds(Long[] ids) |
| | | { |
| | | return apsBomHeaderMapper.deleteApsBomHeaderByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤BOM Header æ°æ®ç®¡çä¿¡æ¯ |
| | | * |
| | | * @param id BOM Header æ°æ®ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteApsBomHeaderById(Long id) |
| | | { |
| | | return apsBomHeaderMapper.deleteApsBomHeaderById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.aps.core.mapper.ApsBomHeaderMapper"> |
| | | |
| | | <resultMap type="ApsBomHeader" id="ApsBomHeaderResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="bomHeaderId" column="bom_header_id" /> |
| | | <result property="itemCode" column="item_code" /> |
| | | <result property="itemName" column="item_name" /> |
| | | <result property="startDate" column="start_date" /> |
| | | <result property="endDate" column="end_date" /> |
| | | <result property="orgCode" column="org_code" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsBomHeaderVo"> |
| | | select id, bom_header_id, item_code, item_name, start_date, end_date, org_code, |
| | | del_flag, create_by, create_time, update_by, update_time |
| | | from aps_bom_header |
| | | </sql> |
| | | |
| | | <select id="selectApsBomHeaderList" parameterType="ApsBomHeader" resultMap="ApsBomHeaderResult"> |
| | | <include refid="selectApsBomHeaderVo"/> |
| | | <where> |
| | | <if test="bomHeaderId != null and bomHeaderId != ''"> and bom_header_id = #{bomHeaderId}</if> |
| | | <if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if> |
| | | <if test="itemName != null and itemName != ''"> and item_name = #{itemName}</if> |
| | | <if test="startDate != null "> and start_date = #{startDate}</if> |
| | | <if test="endDate != null "> and end_date = #{endDate}</if> |
| | | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectApsBomHeaderById" parameterType="Long" resultMap="ApsBomHeaderResult"> |
| | | <include refid="selectApsBomHeaderVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertApsBomHeader" parameterType="ApsBomHeader"> |
| | | insert into aps_bom_header |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="bomHeaderId != null">bom_header_id,</if> |
| | | <if test="itemCode != null">item_code,</if> |
| | | <if test="itemName != null">item_name,</if> |
| | | <if test="startDate != null">start_date,</if> |
| | | <if test="endDate != null">end_date,</if> |
| | | <if test="orgCode != null">org_code,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="bomHeaderId != null">#{bomHeaderId},</if> |
| | | <if test="itemCode != null">#{itemCode},</if> |
| | | <if test="itemName != null">#{itemName},</if> |
| | | <if test="startDate != null">#{startDate},</if> |
| | | <if test="endDate != null">#{endDate},</if> |
| | | <if test="orgCode != null">#{orgCode},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateApsBomHeader" parameterType="ApsBomHeader"> |
| | | update aps_bom_header |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="bomHeaderId != null">bom_header_id = #{bomHeaderId},</if> |
| | | <if test="itemCode != null">item_code = #{itemCode},</if> |
| | | <if test="itemName != null">item_name = #{itemName},</if> |
| | | <if test="startDate != null">start_date = #{startDate},</if> |
| | | <if test="endDate != null">end_date = #{endDate},</if> |
| | | <if test="orgCode != null">org_code = #{orgCode},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteApsBomHeaderById" parameterType="Long"> |
| | | delete from aps_bom_header where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteApsBomHeaderByIds" parameterType="String"> |
| | | delete from aps_bom_header where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | |
| | | <resultMap type="ApsBom" id="ApsBomResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="bomId" column="bom_id" /> |
| | | <result property="parentBomId" column="parent_bom_id" /> |
| | | <result property="bomLineId" column="bom_line_id" /> |
| | | <result property="bomHeaderId" column="bom_header_id" /> |
| | | <result property="itemCode" column="item_code" /> |
| | | <result property="itemName" column="item_name" /> |
| | | <result property="startDate" column="start_date" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsBomVo"> |
| | | select id, bom_id, parent_bom_id, item_code, item_name, start_date, end_date, org_code, del_flag, create_by, create_time, update_by, update_time, drawing_no, process_no, unit, num, total_num, preparation_time, processing_time from aps_bom |
| | | select id, bom_line_id, bom_header_id, item_code, item_name, start_date, end_date, org_code, |
| | | del_flag, create_by, create_time, update_by, update_time, drawing_no, process_no, unit, num, |
| | | total_num, preparation_time, processing_time |
| | | from aps_bom_line |
| | | </sql> |
| | | |
| | | <select id="selectApsBomList" parameterType="ApsBom" resultMap="ApsBomResult"> |
| | | <include refid="selectApsBomVo"/> |
| | | <where> |
| | | <if test="bomId != null and bomId != ''"> and bom_id = #{bomId}</if> |
| | | <if test="parentBomId != null and parentBomId != ''"> and parent_bom_id = #{parentBomId}</if> |
| | | <if test="bomLineId != null and bomLineId != ''"> and bom_line_id = #{bomLineId}</if> |
| | | <if test="bomHeaderId != null and bomHeaderId != ''"> and bom_header_id = #{bomHeaderId}</if> |
| | | <if test="itemCode != null and itemCode != ''"> and item_code like '%'||#{itemCode}||'%'</if> |
| | | <if test="itemName != null and itemName != ''"> and item_name like '%'|| #{itemName}||'%'</if> |
| | | <if test="params.beginStartDate != null and params.beginStartDate != '' and params.endStartDate != null and params.endStartDate != ''"> and start_date between #{params.beginStartDate} and #{params.endStartDate}</if> |
| | |
| | | <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> |
| | | and del_flag='0' |
| | | </where> |
| | | order by parent_bom_id,bom_id |
| | | order by bom_header_id,bom_line_id |
| | | </select> |
| | | |
| | | <select id="selectApsBomById" parameterType="Long" resultMap="ApsBomResult"> |
| | |
| | | </select> |
| | | |
| | | <insert id="insertApsBom" parameterType="ApsBom" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into aps_bom |
| | | insert into aps_bom_line |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="bomId != null">bom_id,</if> |
| | | <if test="parentBomId != null">parent_bom_id,</if> |
| | | <if test="bomLineId != null">bom_line_id,</if> |
| | | <if test="bomHeaderId != null">bom_header_id,</if> |
| | | <if test="itemCode != null">item_code,</if> |
| | | <if test="itemName != null">item_name,</if> |
| | | <if test="startDate != null">start_date,</if> |
| | |
| | | <if test="processingTime != null">processing_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="bomId != null">#{bomId},</if> |
| | | <if test="parentBomId != null">#{parentBomId},</if> |
| | | <if test="bomLineId != null">#{bomLineId},</if> |
| | | <if test="bomHeaderId != null">#{bomHeaderId},</if> |
| | | <if test="itemCode != null">#{itemCode},</if> |
| | | <if test="itemName != null">#{itemName},</if> |
| | | <if test="startDate != null">#{startDate},</if> |
| | |
| | | </insert> |
| | | |
| | | <update id="updateApsBom" parameterType="ApsBom"> |
| | | update aps_bom |
| | | update aps_bom_line |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="bomId != null">bom_id = #{bomId},</if> |
| | | <if test="parentBomId != null">parent_bom_id = #{parentBomId},</if> |
| | | <if test="bomLineId != null">bom_line_id = #{bomLineId},</if> |
| | | <if test="bomHeaderId != null">bom_header_id = #{bomHeaderId},</if> |
| | | <if test="itemCode != null">item_code = #{itemCode},</if> |
| | | <if test="itemName != null">item_name = #{itemName},</if> |
| | | <if test="startDate != null">start_date = #{startDate},</if> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteApsBomById" parameterType="Long"> |
| | | delete from aps_bom where id = #{id} |
| | | delete from aps_bom_line where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteApsBomByIds" parameterType="String"> |
| | | delete from aps_bom where id in |
| | | delete from aps_bom_line where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | AND lower(table_name) like '%'|| #{tableName}|| '%' |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | AND lower(table_comment) like '%' || #{tableComment} ||'%' |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | and to_char(create_time,'yyyy-MM-dd') >= to_char(#{params.beginTime},'yyyy-MM-dd') |
| | |
| | | WHERE table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%' |
| | | AND table_name NOT IN (select table_name from gen_table) |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | AND lower(table_name) like '%'|| #{tableName}||'%' |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | AND lower(table_comment) like '%'|| #{tableComment}||'%' |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | and create_time::date >= to_date(#{params.beginTime},'yyyy-MM-dd') |