Commit e625a18b authored by wanghang's avatar wanghang

workInstruction

parent 2ccc6714
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="topsun-bpm" uuid="4effcd72-8d2a-4f94-bd95-5c6c03ab5f1c">
<data-source source="LOCAL" name="topsun@192.168.222.122" uuid="2c3733f6-4693-4fee-ab93-676f9bf4da3b">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://localhost:3306/topsun</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
<data-source source="LOCAL" name="topsun@192.168.222.122" uuid="3cf19773-14e4-4144-8b84-c648d3c0d308">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://192.168.222.122:3406/topsun</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TemplatesSettings">
<option name="templateConfigs">
<TemplateContext>
<option name="generateConfig">
<GenerateConfig>
<option name="annotationType" value="JPA" />
<option name="basePackage" value="generator" />
<option name="basePath" value="src/main/java" />
<option name="classNameStrategy" value="camel" />
<option name="encoding" value="UTF-8" />
<option name="extraClassSuffix" value="" />
<option name="ignoreFieldPrefix" value="" />
<option name="ignoreFieldSuffix" value="" />
<option name="ignoreTablePrefix" value="" />
<option name="ignoreTableSuffix" value="" />
<option name="moduleName" value="topsun" />
<option name="modulePath" value="$PROJECT_DIR$/topsun" />
<option name="moduleUIInfoList">
<list>
<ModuleInfoGo>
<option name="basePath" value="${domain.basePath}" />
<option name="configFileName" value="mapperInterface.ftl" />
<option name="configName" value="mapperInterface" />
<option name="encoding" value="${domain.encoding}" />
<option name="fileName" value="${domain.fileName}Mapper" />
<option name="fileNameWithSuffix" value="${domain.fileName}Mapper.java" />
<option name="modulePath" value="$PROJECT_DIR$/topsun" />
<option name="packageName" value="${domain.basePackage}.mapper" />
</ModuleInfoGo>
<ModuleInfoGo>
<option name="basePath" value="src/main/resources" />
<option name="configFileName" value="mapperXml.ftl" />
<option name="configName" value="mapperXml" />
<option name="encoding" value="${domain.encoding}" />
<option name="fileName" value="${domain.fileName}Mapper" />
<option name="fileNameWithSuffix" value="${domain.fileName}Mapper.xml" />
<option name="modulePath" value="$PROJECT_DIR$/topsun" />
<option name="packageName" value="mapper" />
</ModuleInfoGo>
</list>
</option>
<option name="needsComment" value="true" />
<option name="needsModel" value="true" />
<option name="relativePackage" value="domain" />
<option name="superClass" value="" />
<option name="tableUIInfoList">
<list>
<TableUIInfo>
<option name="className" value="WorkInstruction" />
<option name="tableName" value="work_instruction" />
</TableUIInfo>
</list>
</option>
<option name="templatesName" value="default-all" />
<option name="useLombokPlugin" value="true" />
</GenerateConfig>
</option>
<option name="moduleName" value="topsun" />
<option name="projectPath" value="$PROJECT_DIR$" />
<option name="templateName" value="default-all" />
</TemplateContext>
</option>
</component>
</project>
\ No newline at end of file
......@@ -16,39 +16,16 @@ function bindQueryEvent() {
function saveForm(){
var _self=this;
$('#submitForm').ajaxSubmit({
url : web_app.name + '/resourceField/saveResourceFiledValue.ajax',
url : web_app.name + '/workInstrcutionApply/saveWorkInstrcutionApply.ajax',
param:{},
success : function(data) {
if (data == "1"){
Public.successTip("保存成功!");
}
_self.close();
reloadGrid();
}
});
}
function saveForm(){
var _self=this;
$('#submitForm').ajaxSubmit({
url : web_app.name + '/proofingMake/saveProofingMake.ajax',
param:{},
success : function(data) {
if (data == "1"){
Public.successTip("保存成功!");
}
_self.close();
}
});
let productId=$("#productId").val();
let proofingMakeNo=$("#proofingMakeNo").val();
UICtrl.addTabItem({
tabid: 'workInstrcutionApply'+proofingMakeNo,
text: "作业指导申请书",
url: web_app.name + '/workInstrcutionApply/forwardWorkInstrcutionApply.do?productId='+productId
});
}
......
......@@ -7,7 +7,7 @@
<x:script src='/biz/topsun/proofing/workInstrcutionApply.js'/>
<div class="container-fluid" style="padding: 10px;">
<form class="hg-form" method="post" action="" id="submitForm">
<x:billTitle title="打样制造单" needStatus="false" needPerson="true"/>
<x:billTitle title="作业指导申请书" needStatus="false" needPerson="true"/>
<div><h3>基本信息</h3></div>
<div style="margin: 10px;">
<div class="hg-form-cols">
......
package com.huigou.topsun.proofing.application;
import com.huigou.topsun.proofing.domain.model.WorkInstruction;
import org.springframework.data.jpa.repository.JpaRepository;
public interface WorkInstructionApplication {
}
package com.huigou.topsun.proofing.application.impl;
import com.huigou.topsun.proofing.application.WorkInstructionApplication;
import org.springframework.stereotype.Service;
@Service
public class WorkInstructionApplicationImpl implements WorkInstructionApplication {
}
......@@ -89,6 +89,7 @@ public class ProofingMakeController extends CommonController {
SDO sdo = this.getSDO();
ProofingMake proofingMake = sdo.toObject(ProofingMake.class);
proofingMakeApplication.saveProofingMake(proofingMake);
return success(proofingMake);
}
......
......@@ -26,9 +26,13 @@ public class WorkInstrcutionApplyController extends CommonController {
WorkInstrcutionApplyApplication workInstrcutionApplyApplication;
/**
* 跳转作业指导申请书
* 如果有productId参数,就说明从打样制造单发送的请求,携带该参数跳转
* @return
*/
public String forwardWorkInstrcutionApply(){
String workInstrcutionApplyId = UUID.randomUUID().toString().replace("-", "");
this.putAttribute("workInstrcutionApplyId", workInstrcutionApplyId);
SDO sdo = this.getSDO();
String productId = sdo.getString("productId");
if(productId!=null&&!"".equals(productId))this.putAttribute("productId", productId);
......
package com.huigou.topsun.proofing.controller;
import com.huigou.topsun.product.application.ProductApplication;
import com.huigou.topsun.proofing.application.WorkInstrcutionApplyApplication;
import com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@Controller
@ControllerMapping("/workInstruction")
public class WorkInstructionController extends CommonController {
protected String getPagePath() {
return "/biz/topsun/proofing/";
}
/**
* 跳转作业指导申请书
* 如果有productId参数,就说明从打样制造单发送的请求,携带该参数跳转
* @return
*/
public String forwardWorkInstruction(){
return forward("workInstruction");
}
}
package com.huigou.topsun.proofing.domain.model;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 作业指导书
* @TableName work_instruction
*/
@Table(name="work_instruction")
@Entity
@Data
public class WorkInstruction implements Serializable {
/**
* 作业指导书
*/
@Id
@Column(name = "work_instruction_id")
private String workInstructionId;
/**
* 作业指导申请书id
*/
@Column(name = "work_instruction_apply_id")
private String workInstructionApplyId;
/**
* 是否建立bom表
*/
@Column(name = "is_build_bom")
private String isBuildBom;
/**
* 确认日期
*/
@Column(name = "confirm_date")
private Date confirmDate;
/**
* 确认人
*/
@Column(name = "comfirm_person")
private String comfirmPerson;
/**
* 是否免检
*/
@Column(name = "is_free_inspection")
private String isFreeInspection;
/**
* 不要质量loss%
*/
@Column(name = "is_no_quality_loss")
private String isNoQualityLoss;
/**
* 样品单号
*/
@Column(name = "sample_order_no")
private String sampleOrderNo;
/**
* 库存编码
*/
@Column(name = "stock_no")
private String stockNo;
/**
* 库存名称
*/
@Column(name = "stock_name")
private String stockName;
/**
* 存档编号
*/
@Column(name = "file_no")
private String fileNo;
/**
* 型体配色
*/
@Column(name = "style_color_match")
private String styleColorMatch;
/**
* 客户料号
*/
@Column(name = "customer_material_no")
private String customerMaterialNo;
/**
* 版本号
*/
@Column(name = "version_no")
private String versionNo;
/**
*
*/
private String coefficient;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.proofing.repository;
import com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply;
import com.huigou.topsun.proofing.domain.model.WorkInstruction;
import org.springframework.data.jpa.repository.JpaRepository;
public interface WorkInstructionRepository extends JpaRepository<WorkInstruction, String> {
}
<?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="generator.mapper.WorkInstructionMapper">
<resultMap id="BaseResultMap" type="generator.domain.WorkInstruction">
<id property="workInstructionId" column="work_instruction_id" jdbcType="VARCHAR"/>
<result property="workInstructionApplyId" column="work_instruction_apply_id" jdbcType="VARCHAR"/>
<result property="isBuildBom" column="is_build_bom" jdbcType="VARCHAR"/>
<result property="confirmDate" column="confirm_date" jdbcType="TIMESTAMP"/>
<result property="comfirmPerson" column="comfirm_person" jdbcType="VARCHAR"/>
<result property="isFreeInspection" column="is_free_inspection" jdbcType="VARCHAR"/>
<result property="isNoQualityLoss" column="is_no_quality_loss" jdbcType="VARCHAR"/>
<result property="sampleOrderNo" column="sample_order_no" jdbcType="VARCHAR"/>
<result property="stockNo" column="stock_no" jdbcType="VARCHAR"/>
<result property="stockName" column="stock_name" jdbcType="VARCHAR"/>
<result property="fileNo" column="file_no" jdbcType="VARCHAR"/>
<result property="styleColorMatch" column="style_color_match" jdbcType="VARCHAR"/>
<result property="customerMaterialNo" column="customer_material_no" jdbcType="VARCHAR"/>
<result property="versionNo" column="version_no" jdbcType="VARCHAR"/>
<result property="coefficient" column="coefficient" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
work_instruction_id,work_instruction_apply_id,is_build_bom,
confirm_date,comfirm_person,is_free_inspection,
is_no_quality_loss,sample_order_no,stock_no,
stock_name,file_no,style_color_match,
customer_material_no,version_no,coefficient
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from work_instruction
where work_instruction_id = #{workInstructionId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from work_instruction
where work_instruction_id = #{workInstructionId,jdbcType=VARCHAR}
</delete>
<insert id="insert" keyColumn="work_instruction_id" keyProperty="workInstructionId" parameterType="generator.domain.WorkInstruction" useGeneratedKeys="true">
insert into work_instruction
( work_instruction_id,work_instruction_apply_id,is_build_bom
,confirm_date,comfirm_person,is_free_inspection
,is_no_quality_loss,sample_order_no,stock_no
,stock_name,file_no,style_color_match
,customer_material_no,version_no,coefficient
)
values (#{workInstructionId,jdbcType=VARCHAR},#{workInstructionApplyId,jdbcType=VARCHAR},#{isBuildBom,jdbcType=VARCHAR}
,#{confirmDate,jdbcType=TIMESTAMP},#{comfirmPerson,jdbcType=VARCHAR},#{isFreeInspection,jdbcType=VARCHAR}
,#{isNoQualityLoss,jdbcType=VARCHAR},#{sampleOrderNo,jdbcType=VARCHAR},#{stockNo,jdbcType=VARCHAR}
,#{stockName,jdbcType=VARCHAR},#{fileNo,jdbcType=VARCHAR},#{styleColorMatch,jdbcType=VARCHAR}
,#{customerMaterialNo,jdbcType=VARCHAR},#{versionNo,jdbcType=VARCHAR},#{coefficient,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="work_instruction_id" keyProperty="workInstructionId" parameterType="generator.domain.WorkInstruction" useGeneratedKeys="true">
insert into work_instruction
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workInstructionId != null">work_instruction_id,</if>
<if test="workInstructionApplyId != null">work_instruction_apply_id,</if>
<if test="isBuildBom != null">is_build_bom,</if>
<if test="confirmDate != null">confirm_date,</if>
<if test="comfirmPerson != null">comfirm_person,</if>
<if test="isFreeInspection != null">is_free_inspection,</if>
<if test="isNoQualityLoss != null">is_no_quality_loss,</if>
<if test="sampleOrderNo != null">sample_order_no,</if>
<if test="stockNo != null">stock_no,</if>
<if test="stockName != null">stock_name,</if>
<if test="fileNo != null">file_no,</if>
<if test="styleColorMatch != null">style_color_match,</if>
<if test="customerMaterialNo != null">customer_material_no,</if>
<if test="versionNo != null">version_no,</if>
<if test="coefficient != null">coefficient,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workInstructionId != null">#{workInstructionId,jdbcType=VARCHAR},</if>
<if test="workInstructionApplyId != null">#{workInstructionApplyId,jdbcType=VARCHAR},</if>
<if test="isBuildBom != null">#{isBuildBom,jdbcType=VARCHAR},</if>
<if test="confirmDate != null">#{confirmDate,jdbcType=TIMESTAMP},</if>
<if test="comfirmPerson != null">#{comfirmPerson,jdbcType=VARCHAR},</if>
<if test="isFreeInspection != null">#{isFreeInspection,jdbcType=VARCHAR},</if>
<if test="isNoQualityLoss != null">#{isNoQualityLoss,jdbcType=VARCHAR},</if>
<if test="sampleOrderNo != null">#{sampleOrderNo,jdbcType=VARCHAR},</if>
<if test="stockNo != null">#{stockNo,jdbcType=VARCHAR},</if>
<if test="stockName != null">#{stockName,jdbcType=VARCHAR},</if>
<if test="fileNo != null">#{fileNo,jdbcType=VARCHAR},</if>
<if test="styleColorMatch != null">#{styleColorMatch,jdbcType=VARCHAR},</if>
<if test="customerMaterialNo != null">#{customerMaterialNo,jdbcType=VARCHAR},</if>
<if test="versionNo != null">#{versionNo,jdbcType=VARCHAR},</if>
<if test="coefficient != null">#{coefficient,jdbcType=VARCHAR},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="generator.domain.WorkInstruction">
update work_instruction
<set>
<if test="workInstructionApplyId != null">
work_instruction_apply_id = #{workInstructionApplyId,jdbcType=VARCHAR},
</if>
<if test="isBuildBom != null">
is_build_bom = #{isBuildBom,jdbcType=VARCHAR},
</if>
<if test="confirmDate != null">
confirm_date = #{confirmDate,jdbcType=TIMESTAMP},
</if>
<if test="comfirmPerson != null">
comfirm_person = #{comfirmPerson,jdbcType=VARCHAR},
</if>
<if test="isFreeInspection != null">
is_free_inspection = #{isFreeInspection,jdbcType=VARCHAR},
</if>
<if test="isNoQualityLoss != null">
is_no_quality_loss = #{isNoQualityLoss,jdbcType=VARCHAR},
</if>
<if test="sampleOrderNo != null">
sample_order_no = #{sampleOrderNo,jdbcType=VARCHAR},
</if>
<if test="stockNo != null">
stock_no = #{stockNo,jdbcType=VARCHAR},
</if>
<if test="stockName != null">
stock_name = #{stockName,jdbcType=VARCHAR},
</if>
<if test="fileNo != null">
file_no = #{fileNo,jdbcType=VARCHAR},
</if>
<if test="styleColorMatch != null">
style_color_match = #{styleColorMatch,jdbcType=VARCHAR},
</if>
<if test="customerMaterialNo != null">
customer_material_no = #{customerMaterialNo,jdbcType=VARCHAR},
</if>
<if test="versionNo != null">
version_no = #{versionNo,jdbcType=VARCHAR},
</if>
<if test="coefficient != null">
coefficient = #{coefficient,jdbcType=VARCHAR},
</if>
</set>
where work_instruction_id = #{workInstructionId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="generator.domain.WorkInstruction">
update work_instruction
set
work_instruction_apply_id = #{workInstructionApplyId,jdbcType=VARCHAR},
is_build_bom = #{isBuildBom,jdbcType=VARCHAR},
confirm_date = #{confirmDate,jdbcType=TIMESTAMP},
comfirm_person = #{comfirmPerson,jdbcType=VARCHAR},
is_free_inspection = #{isFreeInspection,jdbcType=VARCHAR},
is_no_quality_loss = #{isNoQualityLoss,jdbcType=VARCHAR},
sample_order_no = #{sampleOrderNo,jdbcType=VARCHAR},
stock_no = #{stockNo,jdbcType=VARCHAR},
stock_name = #{stockName,jdbcType=VARCHAR},
file_no = #{fileNo,jdbcType=VARCHAR},
style_color_match = #{styleColorMatch,jdbcType=VARCHAR},
customer_material_no = #{customerMaterialNo,jdbcType=VARCHAR},
version_no = #{versionNo,jdbcType=VARCHAR},
coefficient = #{coefficient,jdbcType=VARCHAR}
where work_instruction_id = #{workInstructionId,jdbcType=VARCHAR}
</update>
</mapper>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment