Commit 7c40ab74 authored by wanghang's avatar wanghang

打样申请流程

parent b2baed58
...@@ -8,5 +8,12 @@ ...@@ -8,5 +8,12 @@
<jdbc-url>jdbc:mysql://localhost:3306/topsun</jdbc-url> <jdbc-url>jdbc:mysql://localhost:3306/topsun</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir> <working-dir>$ProjectFileDir$</working-dir>
</data-source> </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-url>jdbc:mysql://192.168.222.122:3406/topsun</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -41,6 +41,7 @@ function echo(node){ ...@@ -41,6 +41,7 @@ function echo(node){
$("#"+node+"_text").val($("#"+node).val()) $("#"+node+"_text").val($("#"+node).val())
} }
//工艺、工序、工序物料三级联动 //工艺、工序、工序物料三级联动
function test(){ function test(){
...@@ -57,6 +58,8 @@ function initializateUI() { ...@@ -57,6 +58,8 @@ function initializateUI() {
//创建表格(参数、列、插入的节点、请求地址) //创建表格(参数、列、插入的节点、请求地址)
function loadProofingApplyGrid(param,columns,node,url) { function loadProofingApplyGrid(param,columns,node,url) {
const toolbarOptions = istoolbar const toolbarOptions = istoolbar
? UICtrl.getDefaultToolbarOptions({ ? UICtrl.getDefaultToolbarOptions({
addHandler: addHandler, addHandler: addHandler,
...@@ -68,16 +71,17 @@ function loadProofingApplyGrid(param,columns,node,url) { ...@@ -68,16 +71,17 @@ function loadProofingApplyGrid(param,columns,node,url) {
: null; : null;
istoolbar = false; istoolbar = false;
gridManager = UICtrl.grid("#"+node, { gridManager = UICtrl.grid("#"+node, {
columns: columns, columns: columns,
dataAction: "server", dataAction: "server",
url: web_app.name + '/proofingApply/'+url+'.ajax', url: web_app.name + '/proofingApply/'+url+'.ajax',
parms:param, parms:param,
pageSize: 20, pageSize: 10,
usePager: true, usePager: true,
toolbar: toolbarOptions, toolbar: toolbarOptions,
width: "100%", width: "100%",
height: "100%", height: "50%",
heightDiff: -8, heightDiff: -8,
checkbox: true, checkbox: true,
fixedCellHeight: true, fixedCellHeight: true,
...@@ -121,8 +125,7 @@ function bindQueryEvent(){ ...@@ -121,8 +125,7 @@ function bindQueryEvent(){
type : "product",name : "productCode", type : "product",name : "productCode",
onChange:function(value,data){ onChange:function(value,data){
$('#productId').val(data.productId); $('#productId').val(data.productId);
console.log($('#productId').val()) loadProofingApplyGrid({id:data.productId},bom,"mobTableGrid","slicedQueryBomRule");
loadProofingApplyGrid({id:data.productId},bom,"mobTableGrid","forwardProofingApply");
} }
}); });
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<x:inputC name="proofingApplyAllocationType" label="分配方式" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="proofingApplyAllocationType" label="分配方式" maxLength="32" labelCol="1" fieldCol="2"/>
<%-- <x:selectC name="allocationType" label="分配方式" labelCol="1" fieldCol="2"/>--%> <x:selectC name="allocationType" label="test" list="" labelCol="1" fieldCol="2"/>
<x:inputC name="productType" label="产品类别" labelCol="1" fieldCol="2"/> <x:inputC name="productType" label="产品类别" labelCol="1" fieldCol="2"/>
...@@ -74,12 +74,12 @@ ...@@ -74,12 +74,12 @@
<x:selectC name="isOut" required="false" label="是否外发" dictionary="yesorno" labelCol="1" fieldCol="2"/> <x:selectC name="isOut" required="false" label="是否外发" dictionary="yesorno" labelCol="1" fieldCol="2"/>
<x:selectC name="isChange" required="false" label="是否改变" dictionary="yesorno" labelCol="1" fieldCol="2"/> <x:selectC name="isChange" required="false" label="是否改变" dictionary="yesorno" labelCol="1" fieldCol="2"/>
<x:inputC name="plasticBagType" required="false" label="塑料袋结构类型" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="plasticBagType" required="false" label="塑料袋结构类型" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="length" required="false" label="长度(cm)" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="productLength" required="false" label="长度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="width" required="false" label="宽度(cm)" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="productWidth" required="false" label="宽度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="height" required="false" label="高度(cm)" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="productHeight" required="false" label="高度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="thickness" required="false" label="厚度(mm)" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="productThick" required="false" label="厚度(mm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="layerNum" required="false" label="单层厚(丝)" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="productSingleLayer" required="false" label="单层厚(丝)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="applicationStatus" required="false" label="层数" maxLength="32" labelCol="1" fieldCol="2"/> <x:inputC name="productLayerNum" required="false" label="层数" maxLength="32" labelCol="1" fieldCol="2"/>
</div> </div>
</form> </form>
......
package com.huigou.topsun.product.application; package com.huigou.topsun.product.application;
import com.huigou.topsun.product.domain.ProductLooked;
/** /**
* @author 16508 * @author 16508
* @description 针对表【product_looked(产品外观)】的数据库操作Service * @description 针对表【product_looked(产品外观)】的数据库操作Service
...@@ -8,4 +10,6 @@ package com.huigou.topsun.product.application; ...@@ -8,4 +10,6 @@ package com.huigou.topsun.product.application;
*/ */
public interface ProductLookedService { public interface ProductLookedService {
public ProductLooked getProductLookedById(String productLookedId);
} }
package com.huigou.topsun.product.application.impl; package com.huigou.topsun.product.application.impl;
import com.huigou.topsun.product.application.ProductLookedService; import com.huigou.topsun.product.application.ProductLookedService;
import com.huigou.topsun.product.domain.ProductLooked;
import com.huigou.topsun.product.repository.ProductLookedRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
...@@ -11,6 +14,14 @@ import org.springframework.stereotype.Service; ...@@ -11,6 +14,14 @@ import org.springframework.stereotype.Service;
@Service @Service
public class ProductLookedServiceImpl implements ProductLookedService{ public class ProductLookedServiceImpl implements ProductLookedService{
@Autowired
ProductLookedRepository productLookedRepository;
@Override
public ProductLooked getProductLookedById(String productLookedId) {
return productLookedRepository.findOne(productLookedId);
}
} }
......
...@@ -17,8 +17,9 @@ public class ProductLooked implements Serializable { ...@@ -17,8 +17,9 @@ public class ProductLooked implements Serializable {
* 产品外观ID * 产品外观ID
*/ */
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) // 使用自增策略
@Column(name = "product_looked_id") @Column(name = "product_looked_id")
private String productLookedId; private Long productLookedId;
/** /**
* 产品ID * 产品ID
......
package com.huigou.topsun.proofing.application.impl; package com.huigou.topsun.proofing.application.impl;
import com.huigou.topsun.product.application.ProductLookedService;
import com.huigou.topsun.product.domain.ProductLooked;
import com.huigou.topsun.product.repository.ProductLookedRepository;
import com.huigou.topsun.proofing.application.ProofingApplyApplication; import com.huigou.topsun.proofing.application.ProofingApplyApplication;
import com.huigou.topsun.proofing.domain.model.ProofingApply; import com.huigou.topsun.proofing.domain.model.ProofingApply;
import com.huigou.topsun.proofing.domain.query.ProofingApplyQuery; import com.huigou.topsun.proofing.domain.query.ProofingApplyQuery;
import com.huigou.topsun.proofing.domain.vo.ProofingApplyOrLookedVo;
import com.huigou.topsun.proofing.mapper.ProofingApplyMapper; import com.huigou.topsun.proofing.mapper.ProofingApplyMapper;
import com.huigou.topsun.proofing.repository.ProofingApplyRepository; import com.huigou.topsun.proofing.repository.ProofingApplyRepository;
import com.huigou.uasp.bmp.common.BizBillStatus; import com.huigou.uasp.bmp.common.BizBillStatus;
...@@ -10,8 +14,11 @@ import com.huigou.uasp.bpm.FlowBroker; ...@@ -10,8 +14,11 @@ import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.util.ClassHelper; import com.huigou.util.ClassHelper;
import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask; import org.activiti.engine.delegate.DelegateTask;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
...@@ -26,6 +33,12 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing ...@@ -26,6 +33,12 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
private ProofingApplyMapper proofingApplyMapper; private ProofingApplyMapper proofingApplyMapper;
private ProductLookedRepository productLookedRepository;
@Autowired
public void setProductLookedRepository(ProductLookedRepository productLookedRepository) {
this.productLookedRepository = productLookedRepository;
}
@Autowired @Autowired
public void setProofingApplyRepository(ProofingApplyRepository proofingApplyRepository) { public void setProofingApplyRepository(ProofingApplyRepository proofingApplyRepository) {
...@@ -47,11 +60,17 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing ...@@ -47,11 +60,17 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
return proofingApplyMapper.slicedQuery(query); return proofingApplyMapper.slicedQuery(query);
} }
@Transactional(propagation = Propagation.REQUIRES_NEW)
@Override @Override
protected String saveBizAndApprovalData() { protected String saveBizAndApprovalData() {
super.saveBizAndApprovalData(); super.saveBizAndApprovalData();
ProofingApply proofingApply = getBizEntity(ProofingApply.class); //从vo类获得两个实体类的属性值
ProofingApplyOrLookedVo pl=getBizEntity(ProofingApplyOrLookedVo.class);
ProofingApply proofingApply = new ProofingApply();
ProductLooked productLooked = new ProductLooked();
BeanUtils.copyProperties(pl,proofingApply);
BeanUtils.copyProperties(pl,productLooked);
if (proofingApply.isNew()) { if (proofingApply.isNew()) {
proofingApply.setStatusId(BizBillStatus.APPLYING.getId()); proofingApply.setStatusId(BizBillStatus.APPLYING.getId());
} else { } else {
...@@ -60,7 +79,10 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing ...@@ -60,7 +79,10 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
String id= UUID.randomUUID().toString().replace("-", ""); String id= UUID.randomUUID().toString().replace("-", "");
proofingApply.setProofingApplyId(id); proofingApply.setProofingApplyId(id);
proofingApply = proofingApplyRepository.save(proofingApply); proofingApply = proofingApplyRepository.save(proofingApply);
productLookedRepository.save(productLooked);
return proofingApply.getId(); return proofingApply.getId();
} }
......
...@@ -2,10 +2,12 @@ package com.huigou.topsun.proofing.controller; ...@@ -2,10 +2,12 @@ package com.huigou.topsun.proofing.controller;
import com.huigou.context.Operator; import com.huigou.context.Operator;
import com.huigou.context.OrgUnit; import com.huigou.context.OrgUnit;
import com.huigou.topsun.product.application.ProductLookedService;
import com.huigou.topsun.proofing.application.ProofingApplyApplication; import com.huigou.topsun.proofing.application.ProofingApplyApplication;
import com.huigou.topsun.proofing.domain.model.ProofingApply; import com.huigou.topsun.proofing.domain.model.ProofingApply;
import com.huigou.topsun.proofing.domain.vo.BomVo; import com.huigou.topsun.proofing.domain.vo.BomVo;
import com.huigou.topsun.proofing.service.BomService;
import com.huigou.uasp.annotation.ControllerMapping; import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus; import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.client.CommonController; import com.huigou.uasp.client.CommonController;
...@@ -28,22 +30,23 @@ public class ProofingApplyController extends CommonController { ...@@ -28,22 +30,23 @@ public class ProofingApplyController extends CommonController {
} }
// @Autowired @Autowired
// private BomService bomService; private BomService bomService;
@Autowired @Autowired
ProofingApplyApplication proofingApplyApplication; ProofingApplyApplication proofingApplyApplication;
@Autowired
ProductLookedService productLookedService;
/** /**
* 打样表单页 * 打样表单页
* @return * @return
*/ */
public String forwardProofingApply(){ public String forwardProofingApply(){
this.putAttribute("processDefinitionKey",ProofingApplyApplication.PROCESS_DEFINITION_KEY); this.putAttribute("processDefinitionKey",ProofingApplyApplication.PROCESS_DEFINITION_KEY);
String applicationNo="测试单号"; String applicationNo="测试单号";
this.putAttribute("procUnitId", "Apply"); this.putAttribute("procUnitId", "Apply");
ProofingApply proofingApply = new ProofingApply(); ProofingApply proofingApply = new ProofingApply();
proofingApply.setProofingApplyNo(applicationNo); proofingApply.setProofingApplyNo(applicationNo);
proofingApply.setStatusId(BizBillStatus.APPLYING.getId()); proofingApply.setStatusId(BizBillStatus.APPLYING.getId());
...@@ -52,13 +55,13 @@ public class ProofingApplyController extends CommonController { ...@@ -52,13 +55,13 @@ public class ProofingApplyController extends CommonController {
return forward("proofingApply",proofingApply); return forward("proofingApply",proofingApply);
} }
// public String forwardAddBom(){ public String forwardAddBom(){
// //如果有id的话就带参数过去 //如果有id的话就带参数过去
// SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
// String id = sdo.getId(); String id = sdo.getId();
// List<BomVo> bom = bomService.getBomVoByProductId(id); BomVo bom = bomService.getBomVoById(Long.valueOf(id));
// return forward("BomDetail",bom); return forward("BomDetail",bom);
// } }
public String addProofingApply(){ public String addProofingApply(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
...@@ -68,15 +71,15 @@ public class ProofingApplyController extends CommonController { ...@@ -68,15 +71,15 @@ public class ProofingApplyController extends CommonController {
} }
// @LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询BOM表") @LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询BOM表")
// public String slicedQueryBomRule() { public String slicedQueryBomRule() {
// SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
// String id = sdo.getId(); String id = sdo.getId();
//// List<BomVo> bom = bomService.getBomVoByProductId(id); List<BomVo> bom = bomService.getBomVoListByProductId(id);
// Map<String,Object> map =new HashMap(); Map<String,Object> map =new HashMap();
// map.put("Rows",bom); map.put("Rows",bom);
// return toResult(map); return toResult(map);
// } }
public String updateResourceFiledValue(){ public String updateResourceFiledValue(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
...@@ -85,7 +88,6 @@ public class ProofingApplyController extends CommonController { ...@@ -85,7 +88,6 @@ public class ProofingApplyController extends CommonController {
} }
/** /**
* 跳转到打样申请详情页面 * 跳转到打样申请详情页面
*/ */
...@@ -93,7 +95,6 @@ public class ProofingApplyController extends CommonController { ...@@ -93,7 +95,6 @@ public class ProofingApplyController extends CommonController {
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
String id = sdo.getBizId(); String id = sdo.getBizId();
ProofingApply proofingApply = proofingApplyApplication.loadProofingApplyById(id); ProofingApply proofingApply = proofingApplyApplication.loadProofingApplyById(id);
return forward("proofingApply", proofingApply); return forward("proofingApply", proofingApply);
} }
} }
package com.huigou.topsun.proofing.domain.model; package com.huigou.topsun.proofing.domain.model;
import com.huigou.data.domain.model.FlowBillAbstractEntity; import com.huigou.data.domain.model.FlowBillAbstractEntity;
import lombok.Data;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -8,279 +9,145 @@ import javax.persistence.Table; ...@@ -8,279 +9,145 @@ import javax.persistence.Table;
import java.util.Date; import java.util.Date;
/** /**
* 打样申请单表 * 打样申请
* @TableName proofing_apply * @TableName proofing_apply
*/ */
@Table(name ="proofing_apply") @Table(name ="proofing_apply")
@Entity @Entity
@Data
public class ProofingApply extends FlowBillAbstractEntity { public class ProofingApply extends FlowBillAbstractEntity {
/** /**
* 申请单id * 申请单id
*/ */
@Column(name = "proofing_apply_id") @Column(name = "proofing_apply_id")
private String proofingApplyId; private String proofingApplyId;
/** /**
* 申请单号 * 申请单号
*/ */
@Column(name = "proofing_apply_no") @Column(name = "proofing_apply_no")
private String proofingApplyNo; private String proofingApplyNo;
/** /**
* 产品id * 产品id
*/ */
@Column(name = "product_id") @Column(name = "product_id")
private String productId; private String productId;
/** /**
* 客户id * 客户id
*/ */
@Column(name = "customer_id") @Column(name = "customer_id")
private String customerId; private String customerId;
/** /**
* 版面需求时间 * 版面需求时间
*/ */
@Column(name = "proofing_apply_page_need_time") @Column(name = "proofing_apply_page_need_time")
private Date proofingApplyPageNeedTime; private Date proofingApplyPageNeedTime;
/** /**
* 完成日期 * 完成日期
*/ */
@Column(name = "proofing_apply_complete_date") @Column(name = "proofing_apply_complete_date")
private Date proofingApplyCompleteDate; private Date proofingApplyCompleteDate;
/** /**
* 样品中文名称 * 中文样品名
*/ */
@Column(name = "proofing_apply_sample_cn_name") @Column(name = "proofing_apply_sample_cn_name")
private String proofingApplySampleCnName; private String proofingApplySampleCnName;
/** /**
* 样品英文名称 * 英文样品名
*/ */
@Column(name = "proofing_apply_sample_en_name") @Column(name = "proofing_apply_sample_en_name")
private String proofingApplySampleEnName; private String proofingApplySampleEnName;
/** /**
* 样品版次 * 样品版次
*/ */
@Column(name = "proofing_apply_sample_version") @Column(name = "proofing_apply_sample_version")
private Integer proofingApplySampleVersion; private Integer proofingApplySampleVersion;
/** /**
* 样品规格 * 样品规格
*/ */
@Column(name = "proofing_apply_sample_size") @Column(name = "proofing_apply_sample_size")
private Integer proofingApplySampleSize; private Integer proofingApplySampleSize;
/** /**
* 样品数量 * 样品数量
*/ */
@Column(name = "proofing_apply_sample_num") @Column(name = "proofing_apply_sample_num")
private Long proofingApplySampleNum; private Long proofingApplySampleNum;
/** /**
* 产量情况 * 产量情况
*/ */
@Column(name = "proofing_apply_output_situation") @Column(name = "proofing_apply_output_situation")
private String proofingApplyOutputSituation; private String proofingApplyOutputSituation;
/** /**
* 产品代号 * 产品代号
*/ */
@Column(name = "proofing_apply_product_no") @Column(name = "proofing_apply_product_no")
private String proofingApplyProductNo; private String proofingApplyProductNo;
/** /**
* 打样形式 * 打样形式
*/ */
@Column(name = "proofing_type") @Column(name = "proofing_type")
private String proofingType; private String proofingType;
/** /**
* 分配方式 * 分配方式
*/ */
@Column(name = "proofing_apply_allocation_type") @Column(name = "proofing_apply_allocation_type")
private String proofingApplyAllocationType; private String proofingApplyAllocationType;
/** /**
* 表面处理 * 表面处理
*/ */
@Column(name = "proofing_apply_surface_treatment") @Column(name = "proofing_apply_surface_treatment")
private String proofingApplySurfaceTreatment; private String proofingApplySurfaceTreatment;
/** /**
* NG重新打样原因 * NG重新打样原因
*/ */
@Column(name = "proofing_apply_ng_re_reason") @Column(name = "proofing_apply_ng_re_reason")
private String proofingApplyNgReReason; private String proofingApplyNgReReason;
/** /**
* 申请单状态 *申请单状态
*/ */
@Column(name = "proofing_apply_application_status") @Column(name = "proofing_apply_application_status")
private String proofingApplyApplicationStatus; private String proofingApplyApplicationStatus;
/** /**
* 测试标准 *测试标准
*/ */
@Column(name = "proofing_apply_test_standard") @Column(name = "proofing_apply_test_standard")
private String proofingApplyTestStandard; private String proofingApplyTestStandard;
/**
*测试标准
*/
@Column(name = "is_output")
private String isOutput;
/**
*测试标准
*/
@Column(name = "is_out")
private String isOut;
/**
*测试标准
*/
@Column(name = "is_change")
private String isChange;
public String getProofingApplyId() {
return proofingApplyId;
}
public void setProofingApplyId(String proofingApplyId) {
this.proofingApplyId = proofingApplyId;
}
public String getProofingApplyNo() {
return proofingApplyNo;
}
public void setProofingApplyNo(String proofingApplyNo) {
this.proofingApplyNo = proofingApplyNo;
}
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getCustomerId() {
return customerId;
}
public void setCustomerId(String customerId) {
this.customerId = customerId;
}
public Date getProofingApplyPageNeedTime() {
return proofingApplyPageNeedTime;
}
public void setProofingApplyPageNeedTime(Date proofingApplyPageNeedTime) {
this.proofingApplyPageNeedTime = proofingApplyPageNeedTime;
}
public Date getProofingApplyCompleteDate() {
return proofingApplyCompleteDate;
}
public void setProofingApplyCompleteDate(Date proofingApplyCompleteDate) {
this.proofingApplyCompleteDate = proofingApplyCompleteDate;
}
public String getProofingApplySampleCnName() {
return proofingApplySampleCnName;
}
public void setProofingApplySampleCnName(String proofingApplySampleCnName) {
this.proofingApplySampleCnName = proofingApplySampleCnName;
}
public String getProofingApplySampleEnName() {
return proofingApplySampleEnName;
}
public void setProofingApplySampleEnName(String proofingApplySampleEnName) {
this.proofingApplySampleEnName = proofingApplySampleEnName;
}
public Integer getProofingApplySampleVersion() {
return proofingApplySampleVersion;
}
public void setProofingApplySampleVersion(Integer proofingApplySampleVersion) {
this.proofingApplySampleVersion = proofingApplySampleVersion;
}
public Integer getProofingApplySampleSize() {
return proofingApplySampleSize;
}
public void setProofingApplySampleSize(Integer proofingApplySampleSize) {
this.proofingApplySampleSize = proofingApplySampleSize;
}
public Long getProofingApplySampleNum() {
return proofingApplySampleNum;
}
public void setProofingApplySampleNum(Long proofingApplySampleNum) {
this.proofingApplySampleNum = proofingApplySampleNum;
}
public String getProofingApplyOutputSituation() {
return proofingApplyOutputSituation;
}
public void setProofingApplyOutputSituation(String proofingApplyOutputSituation) {
this.proofingApplyOutputSituation = proofingApplyOutputSituation;
}
public String getProofingApplyProductNo() {
return proofingApplyProductNo;
}
public void setProofingApplyProductNo(String proofingApplyProductNo) {
this.proofingApplyProductNo = proofingApplyProductNo;
}
public String getProofingType() {
return proofingType;
}
public void setProofingType(String proofingType) {
this.proofingType = proofingType;
}
public String getProofingApplyAllocationType() {
return proofingApplyAllocationType;
}
public void setProofingApplyAllocationType(String proofingApplyAllocationType) {
this.proofingApplyAllocationType = proofingApplyAllocationType;
}
public String getProofingApplySurfaceTreatment() {
return proofingApplySurfaceTreatment;
}
public void setProofingApplySurfaceTreatment(String proofingApplySurfaceTreatment) {
this.proofingApplySurfaceTreatment = proofingApplySurfaceTreatment;
}
public String getProofingApplyNgReReason() {
return proofingApplyNgReReason;
}
public void setProofingApplyNgReReason(String proofingApplyNgReReason) {
this.proofingApplyNgReReason = proofingApplyNgReReason;
}
public String getProofingApplyApplicationStatus() {
return proofingApplyApplicationStatus;
}
public void setProofingApplyApplicationStatus(String proofingApplyApplicationStatus) {
this.proofingApplyApplicationStatus = proofingApplyApplicationStatus;
}
public String getProofingApplyTestStandard() {
return proofingApplyTestStandard;
}
public void setProofingApplyTestStandard(String proofingApplyTestStandard) {
this.proofingApplyTestStandard = proofingApplyTestStandard;
}
@Override @Override
protected String getCodeRuleId() { protected String getCodeRuleId() {
......
package com.huigou.topsun.proofing.domain.vo; package com.huigou.topsun.proofing.domain.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -7,6 +8,7 @@ import java.io.Serializable; ...@@ -7,6 +8,7 @@ import java.io.Serializable;
/** /**
* 物料清单 * 物料清单
*/ */
@Data @Data
public class BomVo implements Serializable { public class BomVo implements Serializable {
......
package com.huigou.topsun.proofing.domain.vo;
import com.huigou.data.domain.model.FlowBillAbstractEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 样品申请与外观
* @TableName proofing_apply
*/
@Data
public class ProofingApplyOrLookedVo extends FlowBillAbstractEntity{
/**
* 申请单id
*/
@Column(name = "proofing_apply_id")
private String proofingApplyId;
/**
* 申请单号
*/
@Column(name = "proofing_apply_no")
private String proofingApplyNo;
/**
* 产品id
*/
@Column(name = "product_id")
private String productId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 版面需求时间
*/
@Column(name = "proofing_apply_page_need_time")
private Date proofingApplyPageNeedTime;
/**
* 完成日期
*/
@Column(name = "proofing_apply_complete_date")
private Date proofingApplyCompleteDate;
/**
* 中文样品名
*/
@Column(name = "proofing_apply_sample_cn_name")
private String proofingApplySampleCnName;
/**
* 英文样品名
*/
@Column(name = "proofing_apply_sample_en_name")
private String proofingApplySampleEnName;
/**
* 样品版次
*/
@Column(name = "proofing_apply_sample_version")
private Integer proofingApplySampleVersion;
/**
* 样品规格
*/
@Column(name = "proofing_apply_sample_size")
private Integer proofingApplySampleSize;
/**
* 样品数量
*/
@Column(name = "proofing_apply_sample_num")
private Long proofingApplySampleNum;
/**
* 产量情况
*/
@Column(name = "proofing_apply_output_situation")
private String proofingApplyOutputSituation;
/**
* 产品代号
*/
@Column(name = "proofing_apply_product_no")
private String proofingApplyProductNo;
/**
* 打样形式
*/
@Column(name = "proofing_type")
private String proofingType;
/**
* 分配方式
*/
@Column(name = "proofing_apply_allocation_type")
private String proofingApplyAllocationType;
/**
* 表面处理
*/
@Column(name = "proofing_apply_surface_treatment")
private String proofingApplySurfaceTreatment;
/**
* NG重新打样原因
*/
@Column(name = "proofing_apply_ng_re_reason")
private String proofingApplyNgReReason;
/**
*申请单状态
*/
@Column(name = "proofing_apply_application_status")
private String proofingApplyApplicationStatus;
/**
*测试标准
*/
@Column(name = "proofing_apply_test_standard")
private String proofingApplyTestStandard;
/**
*测试标准
*/
@Column(name = "is_output")
private String isOutput;
/**
*测试标准
*/
@Column(name = "is_out")
private String isOut;
/**
*测试标准
*/
@Column(name = "is_change")
private String isChange;
/**
* 长;单位cm
*/
@Column(name = "product_length")
private Double productLength;
/**
* 宽;单位cm
*/
@Column(name = "product_width")
private Double productWidth;
/**
* 高;单位cm
*/
@Column(name = "product_height")
private Double productHeight;
/**
* 厚度;单位mm
*/
@Column(name = "product_thick")
private Double productThick;
/**
* 成品克重;单位g
*/
@Column(name = "product_weight")
private Double productWeight;
/**
* 角型
*/
@Column(name = "product_angle_type")
private String productAngleType;
/**
* 角度(单位mm)
*/
@Column(name = "product_angle")
private Double productAngle;
/**
* 孔径(单位mm)
*/
@Column(name = "product_aperture")
private Double productAperture;
/**
* 单层厚(单位丝)
*/
@Column(name = "product_single_layer")
private Integer productSingleLayer;
/**
* 单重(单位KG)
*/
@Column(name = "product_single_weight")
private Double productSingleWeight;
/**
* 层数
*/
@Column(name = "product_layer_num")
private Integer productLayerNum;
@Override
protected String getCodeRuleId() {
return null;
}
}
\ No newline at end of file
...@@ -8,6 +8,7 @@ import java.util.List; ...@@ -8,6 +8,7 @@ import java.util.List;
public interface BomMapper extends BaseMapper<BomVo> { public interface BomMapper extends BaseMapper<BomVo> {
List<BomVo> getBomVoByProductId(@Param("productId") String productId); List<BomVo> getBomVoListByProductId(@Param("productId") String productId);
BomVo getBomVoById(@Param("productId")Long id);
} }
...@@ -6,7 +6,7 @@ import com.huigou.topsun.proofing.domain.vo.BomVo; ...@@ -6,7 +6,7 @@ import com.huigou.topsun.proofing.domain.vo.BomVo;
import java.util.List; import java.util.List;
public interface BomService extends IService<BomVo> { public interface BomService extends IService<BomVo> {
List<BomVo> getBomVoByProductId(String productId); List<BomVo> getBomVoListByProductId(String productId);
BomVo getBomVoById(Long product_materialId); BomVo getBomVoById(Long id);
} }
...@@ -15,12 +15,12 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomVo> implements Bom ...@@ -15,12 +15,12 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomVo> implements Bom
@Autowired @Autowired
private BomMapper bomMapper; private BomMapper bomMapper;
@Override @Override
public List<BomVo> getBomVoByProductId(String productId) { public List<BomVo> getBomVoListByProductId(String productId) {
return bomMapper.getBomVoByProductId(productId); return bomMapper.getBomVoListByProductId(productId);
} }
@Override @Override
public BomVo getBomVoById(Long product_materialId) { public BomVo getBomVoById(Long id) {
return this.baseMapper.selectById(product_materialId); return bomMapper.getBomVoById(id);
} }
} }
...@@ -13,12 +13,20 @@ ...@@ -13,12 +13,20 @@
<!-- <result property="resourceFieldType" column="resource_field_type" jdbcType="VARCHAR"/>--> <!-- <result property="resourceFieldType" column="resource_field_type" jdbcType="VARCHAR"/>-->
<!-- <result property="resourceFieldShow" column="resource_field_show" jdbcType="VARCHAR"/>--> <!-- <result property="resourceFieldShow" column="resource_field_show" jdbcType="VARCHAR"/>-->
</resultMap> </resultMap>
<sql id="select_BomVo">
<select id='getBomVoByProductId' resultMap="BomVoResultMap">
select pm.product_material_id,pm.material_number,p.product_id select pm.product_material_id,pm.material_number,p.product_id
from product p from product p
inner join product_material pm inner join product_material pm
on(p.product_id=pm.product_id) on(p.product_id=pm.product_id)
where p.product_id=#{productId} or 1=1
</sql>
<select id='getBomVoListByProductId' resultMap="BomVoResultMap">
<include refid="select_BomVo"/>
where p.product_id=#{productId}
</select>
<select id="getBomVoById" resultType="com.huigou.topsun.proofing.domain.vo.BomVo">
<include refid="select_BomVo"/>
where p.product_id=#{productId}
</select> </select>
</mapper> </mapper>
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