【UPDATE】1.修改工单实体新增“作业(工序名称)”属性 2.修改工序实体新增“工作中心”属性 3.修改对应零件和钣金实体 4.修改mapping.xml字段
| | |
| | | package com.aps.core.domain; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.aps.common.core.utils.uuid.IdUtils; |
| | | import com.aps.common.core.utils.uuid.UUID; |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.aps.common.core.annotation.Excel; |
| | | import com.aps.common.core.web.domain.BaseEntity; |
| | | import org.apache.poi.hpsf.Decimal; |
| | | import org.springframework.data.annotation.Id; |
| | | |
| | | import javax.annotation.processing.Generated; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 零件计划管理对象 aps_part_plan |
| | |
| | | /** 风险标识 */ |
| | | @Excel(name = "风险标识") |
| | | private Integer hasRisk; |
| | | |
| | | /** 作业(工序名称) */ |
| | | @Excel(name = "作业") |
| | | private String stdOp; |
| | | |
| | | /** 工厂 */ |
| | | // @Excel(name = "工厂") |
| | |
| | | return hasRisk; |
| | | } |
| | | |
| | | public void setStdOp(String stdOp) { |
| | | this.stdOp = stdOp; |
| | | } |
| | | |
| | | public String getStdOp() { |
| | | return stdOp; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | .append("hasTurnback", getHasTurnback()) |
| | | .append("hasRisk", getHasRisk()) |
| | | .append("plant", getPlant()) |
| | | .append("stdOp", getStdOp()) |
| | | .toString(); |
| | | } |
| | | public String getPlant() { |
| | |
| | | @Excel(name = "风险标识") |
| | | private Integer hasRisk; |
| | | |
| | | /** 作业(工序名称) */ |
| | | @Excel(name = "作业") |
| | | private String stdOp; |
| | | |
| | | /** 工厂 */ |
| | | // @Excel(name = "工厂") |
| | | private String plant; |
| | |
| | | return hasRisk; |
| | | } |
| | | |
| | | public void setStdOp(String stdOp) { |
| | | this.stdOp = stdOp; |
| | | } |
| | | |
| | | public String getStdOp() { |
| | | return stdOp; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | .append("hasTurnback", getHasTurnback()) |
| | | .append("hasRisk", getHasRisk()) |
| | | .append("plant", getPlant()) |
| | | .append("stdOp", getStdOp()) |
| | | .toString(); |
| | | } |
| | | public String getPlant() { |
| | |
| | | /** 删除标志(0代表存在 2代表删除) */ |
| | | private String delFlag; |
| | | |
| | | /** 工作中心 */ |
| | | private String workCenter; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | |
| | | return delFlag; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("itemNo", getItemNo()) |
| | | .append("workOrderNo", getWorkOrderNo()) |
| | | .append("processNumber", getProcessNumber()) |
| | | .append("processName", getProcessName()) |
| | | .append("processPlanStartDay", getProcessPlanStartDay()) |
| | | .append("processPlanEndDay", getProcessPlanEndDay()) |
| | | .append("notStartWorkCount", getNotStartWorkCount()) |
| | | .append("completedCount", getCompletedCount()) |
| | | .append("integrationDay", getIntegrationDay()) |
| | | .append("plant", getPlant()) |
| | | .append("delFlag", getDelFlag()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | } |
| | | |
| | | public BigDecimal getDiscardCount() { |
| | | return discardCount; |
| | | } |
| | |
| | | public void setOrgCode(String orgCode) { |
| | | this.orgCode = orgCode; |
| | | } |
| | | |
| | | public String getWorkCenter() { |
| | | return workCenter; |
| | | } |
| | | |
| | | public void setWorkCenter(String workCenter) { |
| | | this.workCenter = workCenter; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("itemNo", getItemNo()) |
| | | .append("workOrderNo", getWorkOrderNo()) |
| | | .append("processNumber", getProcessNumber()) |
| | | .append("processName", getProcessName()) |
| | | .append("processPlanStartDay", getProcessPlanStartDay()) |
| | | .append("processPlanEndDay", getProcessPlanEndDay()) |
| | | .append("notStartWorkCount", getNotStartWorkCount()) |
| | | .append("completedCount", getCompletedCount()) |
| | | .append("integrationDay", getIntegrationDay()) |
| | | .append("plant", getPlant()) |
| | | .append("delFlag", getDelFlag()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("workCenter", getWorkCenter()) |
| | | .toString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.aps.core.service.impl; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.common.core.utils.uuid.IdUtils; |
| | | import com.aps.common.security.utils.DictUtils; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlatePlanTemp; |
| | | import com.aps.core.mapper.ApsPartPlanTempMapper; |
| | | import com.aps.core.mapper.ApsPlatePlanMapper; |
| | | import com.aps.core.mapper.ApsPlatePlanTempMapper; |
| | | import com.aps.core.service.IApsPlatePlanService; |
| | | import com.aps.system.api.domain.SysDictData; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.core.mapper.ApsPlatePlanMapper; |
| | | import com.aps.core.domain.ApsPlatePlan; |
| | | import com.aps.core.service.IApsPlatePlanService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * 钣金计划管理Service业务层处理 |
| | |
| | | <result property="isStockComplete" column="is_stock_complete" /> |
| | | <result property="hasTurnback" column="has_turnback" /> |
| | | <result property="hasRisk" column="has_risk" /> |
| | | <result property="stdOp" column="std_op" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPartPlanVo"> |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk from aps_part_plan |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk, std_op from aps_part_plan |
| | | </sql> |
| | | |
| | | <select id="selectApsPartPlanList" parameterType="com.aps.core.domain.ApsPartPlan" resultMap="ApsPartPlanResult"> |
| | |
| | | <if test="isStockComplete != null "> and is_stock_complete = #{isStockComplete}</if> |
| | | <if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if> |
| | | <if test="hasRisk != null "> and has_risk = #{hasRisk}</if> |
| | | <if test="stdOp != null "> and std_op = #{stdOp}</if> |
| | | and del_flag='0' |
| | | </where> |
| | | </select> |
| | |
| | | <if test="isStockComplete != null">is_stock_complete,</if> |
| | | <if test="hasTurnback != null">has_turnback,</if> |
| | | <if test="hasRisk != null">has_risk,</if> |
| | | <if test="stdOp != null">std_op,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id != ''">#{id},</if> |
| | |
| | | <if test="isStockComplete != null">#{isStockComplete},</if> |
| | | <if test="hasTurnback != null">#{hasTurnback},</if> |
| | | <if test="hasRisk != null">#{hasRisk},</if> |
| | | <if test="stdOp != null">#{stdOp},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="isStockComplete != null">is_stock_complete = #{isStockComplete},</if> |
| | | <if test="hasTurnback != null">has_turnback = #{hasTurnback},</if> |
| | | <if test="hasRisk != null">has_risk = #{hasRisk},</if> |
| | | <if test="stdOp != null">std_op = #{stdOp},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | is_stock_complete, |
| | | has_turnback, |
| | | has_risk, |
| | | plant |
| | | plant, |
| | | std_op |
| | | ) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.id},#{item.masterPlanner},#{item.weekDay},#{item.weekCycle} |
| | |
| | | ,#{item.standbyNumber},#{item.standbyName},#{item.standbyStock},#{item.nextProcessDeparment} |
| | | ,#{item.isSuspended},#{item.isOutsourcing},#{item.account},#{item.advancedMaterials} |
| | | ,#{item.advancedDocumentNumber},#{item.advancedRequirementDay},#{item.isPlanComplete} |
| | | ,#{item.isStockComplete},#{item.hasTurnback},#{item.hasRisk},#{item.plant}) |
| | | ,#{item.isStockComplete},#{item.hasTurnback},#{item.hasRisk},#{item.plant}),#{item.stdOp}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | <result property="isStockComplete" column="is_stock_complete" /> |
| | | <result property="hasTurnback" column="has_turnback" /> |
| | | <result property="hasRisk" column="has_risk" /> |
| | | <result property="stdOp" column="std_op" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsPlatePlanVo"> |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk from aps_plate_plan |
| | | select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk, std_op from aps_plate_plan |
| | | </sql> |
| | | |
| | | <select id="selectApsPlatePlanList" parameterType="ApsPlatePlan" resultMap="ApsPlatePlanResult"> |
| | |
| | | <if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if> |
| | | <if test="hasRisk != null "> and has_risk = #{hasRisk}</if> |
| | | <if test="plant != null "> and plant = #{plant}</if> |
| | | <if test="stdOp != null "> and std_op = #{stdOp}</if> |
| | | and del_flag='0' |
| | | </where> |
| | | </select> |
| | |
| | | <if test="isStockComplete != null">is_stock_complete,</if> |
| | | <if test="hasTurnback != null">has_turnback,</if> |
| | | <if test="hasRisk != null">has_risk,</if> |
| | | <if test="stdOp != null">std_op,</if> |
| | | create_time, |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="isStockComplete != null">#{isStockComplete},</if> |
| | | <if test="hasTurnback != null">#{hasTurnback},</if> |
| | | <if test="hasRisk != null">#{hasRisk},</if> |
| | | <if test="stdOp != null">#{stdOp},</if> |
| | | #{createTime}, |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="isStockComplete != null">is_stock_complete = #{isStockComplete},</if> |
| | | <if test="hasTurnback != null">has_turnback = #{hasTurnback},</if> |
| | | <if test="hasRisk != null">has_risk = #{hasRisk},</if> |
| | | <if test="stdOp != null">std_op = #{stdOp},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | |
| | | <insert id="insertPlatePlanFromTempByBatchNumber" parameterType="String"> |
| | | insert into aps_plate_plan( |
| | | id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk) |
| | | id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk, std_op) |
| | | SELECT |
| | | id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk |
| | | id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk, std_op |
| | | from aps_plate_plan_temp |
| | | where batch_number = #{batch_number} |
| | | </insert> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="standardTime" column="standard_time" /> |
| | | <result property="processOrder" column="process_order" /> |
| | | <result property="workCenter" column="work_center" /> |
| | | <result property="processQty" column="process_qty" /> |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="orgCode" column="org_code" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsProcessRouteVo"> |
| | | select id, item_no, work_order_no, process_number, process_name, process_plan_start_day, process_plan_end_day, not_start_work_count, completed_count, discard_count, integration_day, plant, del_flag, create_by, create_time, update_by, update_time,standard_time,process_order from aps_process_route |
| | | select id, item_no, work_order_no, process_number, process_name, process_plan_start_day, process_plan_end_day, not_start_work_count, completed_count, discard_count, integration_day, plant, del_flag, create_by, create_time, update_by, update_time,standard_time,process_order,work_center from aps_process_route |
| | | </sql> |
| | | |
| | | <select id="selectApsProcessRouteList" parameterType="ApsProcessRoute" resultMap="ApsProcessRouteResult"> |
| | |
| | | <if test="params.beginIntegrationDay != null and params.beginIntegrationDay != '' and params.endIntegrationDay != null and params.endIntegrationDay != ''"> and integration_day between #{params.beginIntegrationDay} and #{params.endIntegrationDay}</if> |
| | | <!-- <if test="integrationDay != null "> and integration_day = #{integrationDay}</if>--> |
| | | <if test="plant != null and plant != ''"> and plant = #{plant}</if> |
| | | <if test="workCenter != null and workCenter != ''"> and work_center = #{workCenter}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="standardTime != null">standard_time,</if> |
| | | <if test="processOrder != null">process_order,</if> |
| | | <if test="workCenter != null">work_center,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="standardTime != null">#{standardTime},</if> |
| | | <if test="processOrder != null">#{processOrder},</if> |
| | | <if test="workCenter != null">#{workCenter},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="standardTime != null">standard_time = #{standardTime},</if> |
| | | <if test="processOrder != null">process_order = #{processOrder},</if> |
| | | <if test="workCenter != null">work_center = #{workCenter},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | @Excel(name = "删除标志", readConverterExp = "0=代表存在,2=代表删除") |
| | | private String delFlag; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** 作业 */ |
| | | @Excel(name = "作业") |
| | | private String stdOp; |
| | | |
| | | private String orgCode; |
| | | |
| | |
| | | this.orgCode = orgCode; |
| | | } |
| | | |
| | | public void setStdOp(String stdOp) { |
| | | this.stdOp = stdOp; |
| | | } |
| | | |
| | | public String getStdOp() { |
| | | return stdOp; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("processStatus", getProcessStatus()) |
| | | .append("stdOp", getStdOp()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | @Excel(name = "账套编码") |
| | | private String orgCode; |
| | | |
| | | @Excel(name = "工作中心") |
| | | private String workCenter; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | |
| | | return orgCode; |
| | | } |
| | | |
| | | public String getWorkCenter() { |
| | | return workCenter; |
| | | } |
| | | |
| | | public void setWorkCenter(String workCenter) { |
| | | this.workCenter = workCenter; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | .append("opStatus", getOpStatus()) |
| | | .append("org", getOrg()) |
| | | .append("orgCode", getOrgCode()) |
| | | .append("workCenter", getWorkCenter()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | package com.aps.job.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.job.domain.ApsWorkOrderJob; |
| | | import com.aps.job.domain.ApsWorkOrderJobLog; |
| | | import com.aps.job.mapper.ApsWorkOrderJobLogMapper; |
| | | import com.aps.job.mapper.ApsWorkOrderJobMapper; |
| | | import com.aps.job.param.ApsWorkOrderJobParam; |
| | | import com.aps.job.service.IApsWorkOrderJobService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aps.common.core.utils.DateUtils; |
| | | import com.aps.job.domain.ApsWorkOrderJobLog; |
| | | import com.aps.job.mapper.ApsWorkOrderJobLogMapper; |
| | | import com.aps.job.param.ApsWorkOrderJobParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import com.aps.job.mapper.ApsWorkOrderJobMapper; |
| | | import com.aps.job.domain.ApsWorkOrderJob; |
| | | import com.aps.job.service.IApsWorkOrderJobService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | /** |
| | | * 工单同步Service业务层处理 |
| | |
| | | apsWorkOrderProcess.setDocNo(process.getString("DocNo")); |
| | | apsWorkOrderProcess.setOpNum(process.getString("OpNum")); |
| | | apsWorkOrderProcess.setOpId(process.getString("OpID")); |
| | | apsWorkOrderProcess.setProcessName(process.getString("WorkCenter")); |
| | | apsWorkOrderProcess.setProcessName(process.getString("StdOp")); |
| | | apsWorkOrderProcess.setStandardTime(process.getFloat("StandardTime")); |
| | | apsWorkOrderProcess.setPalnStartDate(process.getDate("PlanStartDate")); |
| | | apsWorkOrderProcess.setPlanCompleteDate(process.getDate("PlanCompleteDate")); |
| | |
| | | apsWorkOrderProcess.setOpStatus(process.getString("OpStatus")); |
| | | apsWorkOrderProcess.setOrg(process.getString("Org")); |
| | | apsWorkOrderProcess.setOrgCode(process.getString("OrgCode")); |
| | | apsWorkOrderProcess.setWorkCenter(process.getString("WorkCenter")); |
| | | if (existsId != null) { |
| | | apsWorkOrderProcess.setId(existsId); |
| | | apsWorkOrderProcess.setUpdateTime(DateUtils.getNowDate()); |
| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="processStatus" column="process_status" /> |
| | | <result property="stdOp" column="std_op" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | select id, order_id, doc_no, mainitem_code, mainitem_figure, customer_name, business_type, demand_type, |
| | | doc_status, item_code, item_figure, item_figure_version, pruduct_qty, work_qty, op_num, work_center, |
| | | dept, start_date, complete_date, next_dept, is_hold_release, is_out_source, org, page_num, page_index, |
| | | del_flag, create_by, create_time, update_by, update_time , process_status,org_code |
| | | del_flag, create_by, create_time, update_by, update_time , process_status,org_code, std_op |
| | | from aps_work_order_job |
| | | </sql> |
| | | |
| | |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="orgCode != null">org_code,</if> |
| | | <if test="processStatus != null">process_status,</if> |
| | | <if test="stdOp != null">std_op,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="orderId != null">#{orderId},</if> |
| | |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="orgCode != null">#{orgCode},</if> |
| | | <if test="processStatus != null">#{processStatus},</if> |
| | | <if test="stdOp != null">#{stdOp},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="orgCode != null"> org_code= #{orgCode},</if> |
| | | <if test="processStatus != null"> process_status= #{processStatus},</if> |
| | | <if test="stdOp != null"> std_op= #{stdOp},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | update_by, |
| | | update_time, |
| | | org_code, |
| | | process_status |
| | | process_status, |
| | | std_op, |
| | | </trim> |
| | | values |
| | | <foreach collection="list" item="job" separator=","> |
| | |
| | | #{job.updateBy}, |
| | | #{job.updateTime}, |
| | | #{job.orgCode}, |
| | | #{job.processStatus} |
| | | #{job.processStatus}, |
| | | #{job.stdOp}, |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | process_number,work_center,department, |
| | | plan_start_day,plan_end_day,next_process_deparment, |
| | | is_suspended,is_outsourcing,account, |
| | | id,create_time,del_flag,plant,order_status |
| | | id,create_time,del_flag,plant,order_status,std_op |
| | | ) |
| | | select |
| | | doc_no,mainitem_code,mainitem_figure, |
| | |
| | | op_num,work_center,dept, |
| | | start_date,complete_date,next_dept, |
| | | is_hold_release,is_out_source,org_code, |
| | | order_id,now(),'0',org_code,doc_status |
| | | order_id,now(),'0',org_code,doc_status,std_op |
| | | from aps_work_order_job |
| | | where ( doc_status in (0,1,2,4) and |
| | | (mainitem_code like 'M01%' or mainitem_code like 'M02%'or mainitem_code like 'M05%' or mainitem_code like 'M10%' |
| | |
| | | process_number,work_center,department, |
| | | plan_start_day,plan_end_day,next_process_deparment, |
| | | is_suspended,is_outsourcing,account, |
| | | id,create_time,del_flag,plant,order_status |
| | | id,create_time,del_flag,plant,order_status,,std_op |
| | | ) |
| | | select |
| | | doc_no,mainitem_code,mainitem_figure, |
| | |
| | | op_num,work_center,dept, |
| | | start_date,complete_date,next_dept, |
| | | is_hold_release,is_out_source,org_code, |
| | | order_id,now(),'0',org_code,doc_status |
| | | order_id,now(),'0',org_code,doc_status,,std_op |
| | | from aps_work_order_job |
| | | where ( doc_status in (0,1,2,4) |
| | | and (mainitem_code like 'M03%' or mainitem_code like 'M04%'or mainitem_code like 'A75%') |
| | |
| | | <result property="opStatus" column="op_status" /> |
| | | <result property="org" column="org" /> |
| | | <result property="org_code" column="org_code" /> |
| | | <result property="work_center" column="workCenter" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectApsWorkOrderProcessVo"> |
| | | select id, item_code, doc_no, op_num, op_id, process_name, standard_time, paln_start_date, plan_complete_date, process_qty, scrap_qty, op_status, org, org_code from aps_work_order_process |
| | | select id, item_code, doc_no, op_num, op_id, process_name, standard_time, paln_start_date, plan_complete_date, process_qty, scrap_qty, op_status, org, org_code, work_center from aps_work_order_process |
| | | </sql> |
| | | |
| | | <select id="selectApsWorkOrderProcessList" parameterType="ApsWorkOrderProcess" resultMap="ApsWorkOrderProcessResult"> |
| | |
| | | <if test="scrapQty != null "> and scrap_qty = #{scrapQty}</if> |
| | | <if test="opStatus != null and opStatus != ''"> and op_status = #{opStatus}</if> |
| | | <if test="org != null and org != ''"> and org = #{org}</if> |
| | | <if test="org_code != null and org_code != ''"> and org_code = #{orgCode}</if> |
| | | <if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
| | | <if test="workCenter != null and workCenter != ''"> and work_center = #{workCenter}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="opStatus != null">op_status,</if> |
| | | <if test="org != null">org,</if> |
| | | <if test="orgCode != null">org_code,</if> |
| | | <if test="workCenter != null">work_center,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | |
| | | <if test="opStatus != null">#{opStatus},</if> |
| | | <if test="org != null">#{org},</if> |
| | | <if test="orgCode != null">#{orgCode},</if> |
| | | <if test="workCenter != null">#{work_center},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="opStatus != null">op_status = #{opStatus},</if> |
| | | <if test="org != null">org = #{org},</if> |
| | | <if test="orgCode != null">org_code = #{orgCode},</if> |
| | | <if test="workCenter != null">work_center = #{workCenter},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | scrap_qty = #{item.scrapQty}, |
| | | op_status = #{item.opStatus}, |
| | | org = #{item.org}, |
| | | org_code = #{item.orgCode} |
| | | org_code = #{item.orgCode}, |
| | | work_center = #{item.workCenter} |
| | | WHERE id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | |
| | | scrap_qty, |
| | | op_status, |
| | | org, |
| | | org_code |
| | | org_code, |
| | | work_center |
| | | ) VALUES |
| | | <foreach collection="list" item="item" separator=","> |
| | | ( |
| | |
| | | #{item.opStatus}, |
| | | #{item.org}, |
| | | #{item.orgCode} |
| | | #{item.workCenter} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | discard_count, |
| | | op_status, |
| | | plant, |
| | | org_code |
| | | org_code, |
| | | work_center |
| | | ) |
| | | SELECT |
| | | id, |
| | |
| | | scrap_qty, |
| | | op_status, |
| | | org, |
| | | org_code |
| | | org_code, |
| | | work_center |
| | | FROM aps_work_order_process |
| | | </insert> |
| | | |