Commit 7c40ab74 authored by wanghang's avatar wanghang

打样申请流程

parent b2baed58
......@@ -8,5 +8,12 @@
<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-url>jdbc:mysql://192.168.222.122:3406/topsun</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
\ No newline at end of file
......@@ -41,6 +41,7 @@ function echo(node){
$("#"+node+"_text").val($("#"+node).val())
}
//工艺、工序、工序物料三级联动
function test(){
......@@ -57,6 +58,8 @@ function initializateUI() {
//创建表格(参数、列、插入的节点、请求地址)
function loadProofingApplyGrid(param,columns,node,url) {
const toolbarOptions = istoolbar
? UICtrl.getDefaultToolbarOptions({
addHandler: addHandler,
......@@ -68,16 +71,17 @@ function loadProofingApplyGrid(param,columns,node,url) {
: null;
istoolbar = false;
gridManager = UICtrl.grid("#"+node, {
columns: columns,
dataAction: "server",
url: web_app.name + '/proofingApply/'+url+'.ajax',
parms:param,
pageSize: 20,
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "100%",
height: "50%",
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
......@@ -121,8 +125,7 @@ function bindQueryEvent(){
type : "product",name : "productCode",
onChange:function(value,data){
$('#productId').val(data.productId);
console.log($('#productId').val())
loadProofingApplyGrid({id:data.productId},bom,"mobTableGrid","forwardProofingApply");
loadProofingApplyGrid({id:data.productId},bom,"mobTableGrid","slicedQueryBomRule");
}
});
......
......@@ -53,7 +53,7 @@
<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"/>
......@@ -74,12 +74,12 @@
<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: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="width" 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="thickness" 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="applicationStatus" required="false" label="层数" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productLength" 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="productHeight" required="false" label="高度(cm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productThick" required="false" label="厚度(mm)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productSingleLayer" required="false" label="单层厚(丝)" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="层数" maxLength="32" labelCol="1" fieldCol="2"/>
</div>
</form>
......
package com.huigou.topsun.product.application;
import com.huigou.topsun.product.domain.ProductLooked;
/**
* @author 16508
* @description 针对表【product_looked(产品外观)】的数据库操作Service
......@@ -8,4 +10,6 @@ package com.huigou.topsun.product.application;
*/
public interface ProductLookedService {
public ProductLooked getProductLookedById(String productLookedId);
}
package com.huigou.topsun.product.application.impl;
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;
/**
......@@ -11,6 +14,14 @@ import org.springframework.stereotype.Service;
@Service
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 {
* 产品外观ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY) // 使用自增策略
@Column(name = "product_looked_id")
private String productLookedId;
private Long productLookedId;
/**
* 产品ID
......
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.domain.model.ProofingApply;
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.repository.ProofingApplyRepository;
import com.huigou.uasp.bmp.common.BizBillStatus;
......@@ -10,8 +14,11 @@ import com.huigou.uasp.bpm.FlowBroker;
import com.huigou.util.ClassHelper;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.DelegateTask;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.Map;
import java.util.UUID;
......@@ -26,6 +33,12 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
private ProofingApplyMapper proofingApplyMapper;
private ProductLookedRepository productLookedRepository;
@Autowired
public void setProductLookedRepository(ProductLookedRepository productLookedRepository) {
this.productLookedRepository = productLookedRepository;
}
@Autowired
public void setProofingApplyRepository(ProofingApplyRepository proofingApplyRepository) {
......@@ -47,11 +60,17 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
return proofingApplyMapper.slicedQuery(query);
}
@Transactional(propagation = Propagation.REQUIRES_NEW)
@Override
protected String 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()) {
proofingApply.setStatusId(BizBillStatus.APPLYING.getId());
} else {
......@@ -60,7 +79,10 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
String id= UUID.randomUUID().toString().replace("-", "");
proofingApply.setProofingApplyId(id);
proofingApply = proofingApplyRepository.save(proofingApply);
productLookedRepository.save(productLooked);
return proofingApply.getId();
}
......
......@@ -2,10 +2,12 @@ package com.huigou.topsun.proofing.controller;
import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
import com.huigou.topsun.product.application.ProductLookedService;
import com.huigou.topsun.proofing.application.ProofingApplyApplication;
import com.huigou.topsun.proofing.domain.model.ProofingApply;
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.bmp.common.BizBillStatus;
import com.huigou.uasp.client.CommonController;
......@@ -28,22 +30,23 @@ public class ProofingApplyController extends CommonController {
}
// @Autowired
// private BomService bomService;
@Autowired
private BomService bomService;
@Autowired
ProofingApplyApplication proofingApplyApplication;
@Autowired
ProductLookedService productLookedService;
/**
* 打样表单页
* @return
*/
public String forwardProofingApply(){
this.putAttribute("processDefinitionKey",ProofingApplyApplication.PROCESS_DEFINITION_KEY);
String applicationNo="测试单号";
this.putAttribute("procUnitId", "Apply");
ProofingApply proofingApply = new ProofingApply();
proofingApply.setProofingApplyNo(applicationNo);
proofingApply.setStatusId(BizBillStatus.APPLYING.getId());
......@@ -52,13 +55,13 @@ public class ProofingApplyController extends CommonController {
return forward("proofingApply",proofingApply);
}
// public String forwardAddBom(){
// //如果有id的话就带参数过去
// SDO sdo = this.getSDO();
// String id = sdo.getId();
// List<BomVo> bom = bomService.getBomVoByProductId(id);
// return forward("BomDetail",bom);
// }
public String forwardAddBom(){
//如果有id的话就带参数过去
SDO sdo = this.getSDO();
String id = sdo.getId();
BomVo bom = bomService.getBomVoById(Long.valueOf(id));
return forward("BomDetail",bom);
}
public String addProofingApply(){
SDO sdo = this.getSDO();
......@@ -68,15 +71,15 @@ public class ProofingApplyController extends CommonController {
}
// @LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询BOM表")
// public String slicedQueryBomRule() {
// SDO sdo = this.getSDO();
// String id = sdo.getId();
//// List<BomVo> bom = bomService.getBomVoByProductId(id);
// Map<String,Object> map =new HashMap();
// map.put("Rows",bom);
// return toResult(map);
// }
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询BOM表")
public String slicedQueryBomRule() {
SDO sdo = this.getSDO();
String id = sdo.getId();
List<BomVo> bom = bomService.getBomVoListByProductId(id);
Map<String,Object> map =new HashMap();
map.put("Rows",bom);
return toResult(map);
}
public String updateResourceFiledValue(){
SDO sdo = this.getSDO();
......@@ -85,7 +88,6 @@ public class ProofingApplyController extends CommonController {
}
/**
* 跳转到打样申请详情页面
*/
......@@ -93,7 +95,6 @@ public class ProofingApplyController extends CommonController {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
ProofingApply proofingApply = proofingApplyApplication.loadProofingApplyById(id);
return forward("proofingApply", proofingApply);
}
}
package com.huigou.topsun.proofing.domain.model;
import com.huigou.data.domain.model.FlowBillAbstractEntity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -8,279 +9,145 @@ import javax.persistence.Table;
import java.util.Date;
/**
* 打样申请单表
* 打样申请
* @TableName proofing_apply
*/
@Table(name ="proofing_apply")
@Entity
@Data
public class ProofingApply extends FlowBillAbstractEntity {
/**
* 申请单id
* 申请单id
*/
@Column(name = "proofing_apply_id")
private String proofingApplyId;
/**
* 申请单号
* 申请单号
*/
@Column(name = "proofing_apply_no")
private String proofingApplyNo;
/**
* 产品id
* 产品id
*/
@Column(name = "product_id")
private String productId;
/**
* 客户id
* 客户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重新打样原因
* 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;
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
protected String getCodeRuleId() {
......
package com.huigou.topsun.proofing.domain.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
......@@ -7,6 +8,7 @@ import java.io.Serializable;
/**
* 物料清单
*/
@Data
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;
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;
import java.util.List;
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
@Autowired
private BomMapper bomMapper;
@Override
public List<BomVo> getBomVoByProductId(String productId) {
return bomMapper.getBomVoByProductId(productId);
public List<BomVo> getBomVoListByProductId(String productId) {
return bomMapper.getBomVoListByProductId(productId);
}
@Override
public BomVo getBomVoById(Long product_materialId) {
return this.baseMapper.selectById(product_materialId);
public BomVo getBomVoById(Long id) {
return bomMapper.getBomVoById(id);
}
}
......@@ -13,12 +13,20 @@
<!-- <result property="resourceFieldType" column="resource_field_type" jdbcType="VARCHAR"/>-->
<!-- <result property="resourceFieldShow" column="resource_field_show" jdbcType="VARCHAR"/>-->
</resultMap>
<select id='getBomVoByProductId' resultMap="BomVoResultMap">
<sql id="select_BomVo">
select pm.product_material_id,pm.material_number,p.product_id
from product p
inner join product_material pm
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>
</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