Commit 0582ed1c authored by wanghang's avatar wanghang

申请和制造展示页

parent 4136e703
$(document).ready(function () {
initializateUI();
bindQueryEvent();
// Public.updateDefaultValue($("#productId"));
// echo("productType")
echo("productId");
});
// function echo(node){
// $("#"+node+"_text").val($("#"+node).val())
// }
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
function echo(node){
$("#"+node+"_text").val($("#"+node).val())
}
//绑定selectC
function bindQueryEvent() {
$('#productId').searchbox({
type: "product", name: "productCode",
type: "product",
name: "productCode",
onChange: function (value, data) {
$('#productId').val(data.productId);
$('#productCategoryName').val(data.productCategoryName);
$('#customerId').val(data.productCategoryName);
showTechnologyTable(data.productId);
}
});
......
......@@ -24,13 +24,13 @@
<x:hidden name="personMemberId"/>
<x:hidden name="personMemberName"/>
<div><h3>基本信息</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div class="hg-form-cols">
<x:inputC name="proofingApplyNo" readonly="true" label="申请单号" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productId" label="产品编号" labelCol="1" fieldCol="2"/>
<x:selectC name="customerId" label="品牌客户编号" dictionary="customerType" labelCol="1" fieldCol="2"/>
<x:inputC name="customerId" label="品牌客户编号" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyPageNeedTime" label="版面需求时间" wrapper="date" labelCol="1"
fieldCol="2"/>
......@@ -48,23 +48,25 @@
<x:inputC name="proofingApplyProductNo" label="产品代号" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingType" label="打样形式" labelCol="1" fieldCol="2"/>
<x:selectC name="page" label="版面" dictionary="prodcutLayout" labelCol="1" fieldCol="2"/>
<%-- <x:selectC name="page" label="版面" dictionary="prodcutLayout" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="page" label="版面" required="true" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyAllocationType" label="分配方式" maxLength="32" labelCol="1" fieldCol="2"/>
<x:selectC name="productType" label="产品类别" dictionary="productType" labelCol="1" fieldCol="2"/>
<x:inputC name="productCategoryName" label="产品类别" readonly="true" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplySurfaceTreatment" label="表面处理" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="proofingApplyNgReReason" label="NG重新打样原因" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="a" label="测试标准" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" label="申请单状态" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" label="测试标准" maxLength="32" labelCol="1" fieldCol="2"/>
<x:selectC name="proofingApplyApplicationStatus" label="申请单状态" dictionary="handleResult" labelCol="1" fieldCol="2"/>
</div>
</div>
<div><h3>样品外观要求</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div class="hg-form-cols">
<x:selectC name="isOutput" required="false" label="是否量产" dictionary="yesorno" labelCol="1"
fieldCol="2"/>
......@@ -74,17 +76,17 @@
fieldCol="2"/>
<x:inputC name="plasticBagType" required="false" label="塑料袋结构类型" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productLength" required="false" label="长度(cm)" maxLength="32" labelCol="1"
<x:inputC name="productLength" required="true" label="长度(cm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productWidth" required="false" label="宽度(cm)" maxLength="32" labelCol="1"
<x:inputC name="productWidth" required="true" label="宽度(cm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productHeight" required="false" label="高度(cm)" maxLength="32" labelCol="1"
<x:inputC name="productHeight" required="true" label="高度(cm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productThick" required="false" label="厚度(mm)" maxLength="32" labelCol="1"
<x:inputC name="productThick" required="true" label="厚度(mm)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productSingleLayer" required="false" label="单层厚(丝)" maxLength="32" labelCol="1"
<x:inputC name="productSingleLayer" required="true" label="单层厚(丝)" maxLength="32" labelCol="1"
fieldCol="2"/>
<x:inputC name="productLayerNum" required="false" label="层数" maxLength="32" labelCol="1"
<x:inputC name="productLayerNum" required="true" label="层数" maxLength="32" labelCol="1"
fieldCol="2"/>
</div>
</div>
......
......@@ -12,12 +12,7 @@ function initializateUI() {
function loadProofingApplyListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions({
// addHandler: function(){
// addHandler();
// },
// updateHandler: function(){
// updateHandler();
// },
deleteHandler: deleteHandler,
});
gridManager = UICtrl.grid("#proofingApplyTableGrid", {
......@@ -152,7 +147,7 @@ function loadProofingApplyListGrid() {
fixedCellHeight: true,
selectRowButtonOnly: true,
onDblClickRow: function (data, rowindex, rowobj) {
updateHandler(data.proofingApplyId);
doView(data.id);
}
});
UICtrl.setSearchAreaToggle(gridManager);
......@@ -236,3 +231,10 @@ function deleteHandler() {
});
}
function doView(proofingApplyId) {
UICtrl.addTabItem({
tabid: 'proofingApply',
text: "详情",
url: web_app.name + '/proofingApply/skipProofingApply.do?id='+proofingApplyId
});
}
\ No newline at end of file
......@@ -12,6 +12,8 @@ $(document).ready(function () {
$('#proofingMakeDetail .col-xs-8').addClass('col-sm-9');
echo("page");
echo("productType")
});
......
......@@ -12,7 +12,7 @@
</div>
<form class="hg-form" method="post" action="" id="submitForm">
<div><h3>基本信息</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div class="hg-form-cols">
<x:hidden name="proofingMakeId"/>
<x:hidden name="proofingApplyId"/><!--申请单id-->
......@@ -57,7 +57,7 @@
<x:inputC name="proofingApplyNgReReason" readonly="true" label="NG重新打样原因" maxLength="32"
labelCol="1" fieldCol="2"/>
<x:inputC name="a" readonly="true" label="测试标准" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="proofingApplyTestStandard" readonly="true" label="申请单状态" maxLength="32"
<x:selectC name="proofingApplyTestStandard" required="true" dictionary="handleResult" label="申请单状态"
labelCol="1" fieldCol="2"/>
......@@ -78,7 +78,7 @@
</div>
<div><h3>样品外观要求</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div class="hg-form-cols">
<x:selectC name="isOutput" required="false" label="是否量产" dictionary="yesorno" labelCol="1"
......@@ -125,7 +125,7 @@
</div>
</div>
<div><h3>排版参数</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div class="hg-form-cols">
<x:inputC name="modulus" required="false" label="模数" maxLength="32" labelCol="1" fieldCol="2"/>
<x:inputC name="rowNum" required="false" label="列" maxLength="32" labelCol="1" fieldCol="2"/>
......@@ -148,6 +148,12 @@
fieldCol="2"/>
</div>
</div>
<%@ include file="technologyAndBom/technologyAndBom.jsp" %>
<div class="blank_div clearfix"></div>
<div style="min-height: 40px; text-align: center;">
<x:button value="保存" onclick="" icon="fa-save"/>
<x:button value="重置" onclick="" icon="fa-history"/>
</div>
</form>
<%@ include file="technologyAndBom/technologyAndBom.jsp" %>
</div>
......@@ -5,7 +5,6 @@ $(document).ready(function () {
loadTechnologyListGrid();
});
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
}
......
......@@ -116,7 +116,6 @@ function reloadGrid(parms) {
gridManager.options.parms=parms
}
gridManager.loadData();
}
/**
......
<div><h3>BOM设置</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div id="mobTableGrid" style="margin: 2px;">
<hr>
</div>
......@@ -8,11 +8,9 @@
<div><h3>工艺设置</h3></div>
<div style="margin: 22px;border: 1px solid black;">
<div style="margin: 10px;">
<div id="technology">
<div>
<h4>工艺</h4>
</div>
<x:title title="工艺" isHide="true"/>
<div id="technologyGrid" style="margin: 2px;">
<hr>
</div>
......
$(document).ready(function () {
bindQueryEvent();
});
function echo(node) {
$("#" + node + "_text").val($("#" + node).val())
}
//绑定selectC
function bindQueryEvent() {
$('#productId').searchbox({
type: "proofing", name: "proofingMakeCode",
onChange: function (value, data) {
$('#productId').val(data.productId);
renderDataGoForm(data.productId)
}
});
}
/**
* 根据申请单号发送ajax请求并渲染进表单
* @param proofingApplyNo
*/
function renderDataGoForm(productId) {
$.ajax(
{
type: "POST",
url: web_app.name + '/workInstrcutionApply/queryWorkInstrcutionApply.ajax',
cache: false,
async: true,
dataType: "json",
data: {productId: productId},
success: function (data) {
let form = $('#submitForm');
$.each(data.data, function (key, value) {
let field = form.find('[name="' + key + '"]');
if (field.length > 0) {
field.val(value);
}
});
},
error: function (err) {
alert("异常:" + err)
}
})
}
function saveForm(){
var _self=this;
$('#submitForm').ajaxSubmit({
url : web_app.name + '/resourceField/saveResourceFiledValue.ajax',
param:{},
success : function(data) {
if (data == "1"){
Public.successTip("保存成功!");
}
_self.close();
reloadGrid();
}
});
}
package com.huigou.topsun.product.application;
import com.huigou.topsun.product.domain.ProductCategory;
/**
* @author 16508
* @description 针对表【product_category(产品类别)】的数据库操作Service
......@@ -8,4 +10,5 @@ package com.huigou.topsun.product.application;
*/
public interface ProductCategoryApplication {
ProductCategory getProductCategoryById(String id);
}
......@@ -10,6 +10,11 @@ import com.huigou.topsun.product.domain.ProductLooked;
*/
public interface ProductLookedApplication {
public ProductLooked getProductLookedById(String productLookedId);
/**
* 根据productLooked对象实体拼接条件获取productLooked对象
* @param productLooked
* @return
*/
ProductLooked getProductLookedByEntity(ProductLooked productLooked);
}
package com.huigou.topsun.product.application.impl;
import com.huigou.topsun.product.application.ProductCategoryApplication;
import com.huigou.topsun.product.domain.ProductCategory;
import com.huigou.topsun.product.repository.ProductCategoryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
......@@ -11,6 +14,13 @@ import org.springframework.stereotype.Service;
@Service
public class ProductCategoryApplicationImpl implements ProductCategoryApplication {
@Autowired
ProductCategoryRepository productCategoryRepository;
@Override
public ProductCategory getProductCategoryById(String id) {
return productCategoryRepository.findOne(id);
}
}
......
......@@ -2,8 +2,11 @@ package com.huigou.topsun.product.application.impl;
import com.huigou.topsun.product.application.ProductLookedApplication;
import com.huigou.topsun.product.domain.ProductLooked;
import com.huigou.topsun.product.domain.ProductLoss;
import com.huigou.topsun.product.repository.ProductLookedRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.stereotype.Service;
/**
......@@ -19,8 +22,11 @@ public class ProductLookedApplicationImpl implements ProductLookedApplication {
@Override
public ProductLooked getProductLookedById(String productLookedId) {
return productLookedRepository.findOne(productLookedId);
public ProductLooked getProductLookedByEntity(ProductLooked productLooked) {
ExampleMatcher matcher = ExampleMatcher.matching();
// 构建 Example 对象
Example<ProductLooked> example = Example.of(productLooked, matcher);
return productLookedRepository.findOne(example);
}
}
......
......@@ -57,10 +57,10 @@ public class Product implements Serializable {
private String brandName;
/**
* 产品类型(prodcut_type)
* 产品类型(product_type)
*/
@Column(name = "prodcut_type")
private String prodcutType;
@Column(name = "product_type")
private String productType;
private static final long serialVersionUID = 1L;
......@@ -83,7 +83,7 @@ public class Product implements Serializable {
&& (this.getProductUnit() == null ? other.getProductUnit() == null : this.getProductUnit().equals(other.getProductUnit()))
&& (this.getProductSampleCode() == null ? other.getProductSampleCode() == null : this.getProductSampleCode().equals(other.getProductSampleCode()))
&& (this.getBrandName() == null ? other.getBrandName() == null : this.getBrandName().equals(other.getBrandName()))
&& (this.getProdcutType() == null ? other.getProdcutType() == null : this.getProdcutType().equals(other.getProdcutType()));
&& (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType()));
}
@Override
......@@ -97,7 +97,7 @@ public class Product implements Serializable {
result = prime * result + ((getProductUnit() == null) ? 0 : getProductUnit().hashCode());
result = prime * result + ((getProductSampleCode() == null) ? 0 : getProductSampleCode().hashCode());
result = prime * result + ((getBrandName() == null) ? 0 : getBrandName().hashCode());
result = prime * result + ((getProdcutType() == null) ? 0 : getProdcutType().hashCode());
result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode());
return result;
}
......@@ -114,7 +114,7 @@ public class Product implements Serializable {
sb.append(", productUnit=").append(productUnit);
sb.append(", productSampleCode=").append(productSampleCode);
sb.append(", brandName=").append(brandName);
sb.append(", prodcutType=").append(prodcutType);
sb.append(", productType=").append(productType);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
......
package com.huigou.topsun.product.domain.vo;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
* 产品vo
*/
@Data
public class ProductVo {
/**
* 产品编号
*/
private String productId;
/**
* 产品名称
*/
private String productName;
/**
* 产品英文名
*/
private String productEnglishName;
/**
* 产品类别
*/
private String productCategoryId;
/**
* 产品类型
*/
private String productType;
/**
* 产品品牌
*/
private String brandName;
/**
* 产品状态(码表status)
*/
private String productStatus;
/**
* 产品计量单位
*/
private String productUnit;
/**
* 样品编号
*/
private String productSampleCode;
}
\ No newline at end of file
......@@ -9,4 +9,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
* @Description:
*/
public interface ProductCategoryRepository extends JpaRepository<ProductCategory,String> {
}
......@@ -11,4 +11,5 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public interface ProductRepository extends JpaRepository<Product,String> {
}
......@@ -2,6 +2,7 @@ package com.huigou.topsun.proofing.application;
import com.huigou.topsun.proofing.domain.model.ProofingApply;
import com.huigou.topsun.proofing.domain.query.ProofingApplyQuery;
import com.huigou.topsun.proofing.domain.vo.ProofingApplyAndLookedVo;
import java.util.List;
import java.util.Map;
......@@ -17,4 +18,11 @@ public interface ProofingApplyApplication {
List<ProofingApply> getProofingApplyList();
ProofingApply getProofingApplyByProofingApplyNo(String proofingApplyNo);
/**
* 根据ProofingApply获得样品和产品外观信息
* @param id
* @return
*/
ProofingApplyAndLookedVo getProofingApplyAndLookedVoByPAId(String id);
}
package com.huigou.topsun.proofing.application.impl;
import com.huigou.topsun.product.application.ProductApplication;
import com.huigou.topsun.product.application.ProductCategoryApplication;
import com.huigou.topsun.product.application.ProductLookedApplication;
import com.huigou.topsun.product.domain.Product;
import com.huigou.topsun.product.domain.ProductCategory;
import com.huigou.topsun.product.domain.ProductLooked;
import com.huigou.topsun.product.repository.ProductLookedRepository;
import com.huigou.topsun.product.repository.ProductRepository;
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.domain.vo.ProofingApplyAndLookedVo;
import com.huigou.topsun.proofing.mapper.ProofingApplyMapper;
import com.huigou.topsun.proofing.repository.ProofingApplyRepository;
import com.huigou.uasp.bmp.common.BizBillStatus;
......@@ -29,26 +34,17 @@ import java.util.UUID;
@Service("proofingApplyApplication")
public class ProofingApplyApplicationImpl extends FlowBroker implements ProofingApplyApplication {
@Autowired
private ProofingApplyRepository proofingApplyRepository;
@Autowired
private ProofingApplyMapper proofingApplyMapper;
private ProductLookedRepository productLookedRepository;
@Autowired
public void setProductLookedRepository(ProductLookedRepository productLookedRepository) {
this.productLookedRepository = productLookedRepository;
}
private ProductLookedApplication productLookedApplication;
@Autowired
public void setProofingApplyRepository(ProofingApplyRepository proofingApplyRepository) {
this.proofingApplyRepository = proofingApplyRepository;
}
private ProductCategoryApplication productCategoryApplication;
@Autowired
public void setProofingApplyMapper(ProofingApplyMapper proofingApplyMapper) {
this.proofingApplyMapper = proofingApplyMapper;
}
private ProductRepository productRepository;
@Override
public ProofingApply loadProofingApplyById(String id) {
......@@ -65,23 +61,15 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
protected String saveBizAndApprovalData() {
super.saveBizAndApprovalData();
//从vo类获得两个实体类的属性值
ProofingApplyOrLookedVo pl=getBizEntity(ProofingApplyOrLookedVo.class);
ProofingApply proofingApply = new ProofingApply();
ProductLooked productLooked = new ProductLooked();
BeanUtils.copyProperties(pl,proofingApply);
BeanUtils.copyProperties(pl,productLooked);
ProofingApply proofingApply = getBizEntity(ProofingApply.class);
if (proofingApply.isNew()) {
proofingApply.setStatusId(BizBillStatus.APPLYING.getId());
} else {
proofingApply = (ProofingApply) commonDomainService.loadAndFillinProperties(proofingApply);
}
String id= UUID.randomUUID().toString().replace("-", "");
String id = UUID.randomUUID().toString().replace("-", "");
proofingApply.setProofingApplyId(id);
proofingApply = proofingApplyRepository.save(proofingApply);
productLookedRepository.save(productLooked);
return proofingApply.getId();
}
......@@ -136,4 +124,20 @@ public class ProofingApplyApplicationImpl extends FlowBroker implements Proofing
public ProofingApply getProofingApplyByProofingApplyNo(String proofingApplyNo) {
return proofingApplyRepository.findByProofingApplyNo(proofingApplyNo);
}
@Override
public ProofingApplyAndLookedVo getProofingApplyAndLookedVoByPAId(String id) {
ProofingApplyAndLookedVo proofingApplyAndLookedVo = new ProofingApplyAndLookedVo();
ProofingApply proofingApply = this.loadProofingApplyById(id);
ProductLooked productLooked =new ProductLooked();
productLooked.setProductId(proofingApply.getProductId());
ProductLooked newProductLooked = productLookedApplication.getProductLookedByEntity(productLooked);
Product product = productRepository.findOne(proofingApply.getProductId());
ProductCategory productCategory = productCategoryApplication.getProductCategoryById(product.getProductCategoryId());
BeanUtils.copyProperties(proofingApply,proofingApplyAndLookedVo);
BeanUtils.copyProperties(newProductLooked,proofingApplyAndLookedVo);
proofingApplyAndLookedVo.setProductCategoryName(productCategory.getProductCategoryName());
return proofingApplyAndLookedVo;
}
}
......@@ -4,9 +4,8 @@ import com.huigou.context.Operator;
import com.huigou.context.OrgUnit;
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.topsun.proofing.domain.vo.ProofingApplyAndLookedVo;
import com.huigou.topsun.technology.application.TechnologyApplication;
import com.huigou.topsun.technology.application.TechnologyProcessApplication;
import com.huigou.topsun.technology.domain.model.Technology;
......@@ -21,10 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
@Controller
@ControllerMapping("/proofingApply")
......@@ -34,8 +30,7 @@ public class ProofingApplyController extends CommonController {
}
@Autowired
private BomService bomService;
@Autowired
ProofingApplyApplication proofingApplyApplication;
@Autowired
......@@ -90,26 +85,26 @@ public class ProofingApplyController extends CommonController {
}
@LogInfo(logType = LogType.BIZ, subType = "", operaionType = OperationType.QUERY, description = "分页查询BOM表")
public String slicedQueryBom() {
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);
}
/**
* 跳转到打样申请详情页面
* 工作流审核跳转页面
* @return
*/
public String showProofingApply() {
SDO sdo = this.getSDO();
String id = sdo.getBizId();
ProofingApply proofingApply = proofingApplyApplication.loadProofingApplyById(id);
this.putAttribute("readOnly", "true");
return forward("proofingApply", proofingApply);
ProofingApplyAndLookedVo proofingApplyAndLookedVo = proofingApplyApplication.getProofingApplyAndLookedVoByPAId(id);
return forward("proofingApply", proofingApplyAndLookedVo);
}
// /**
// * 跳转到打样申请详情页面
// */
// public String skipProofingApply() {
// SDO sdo = this.getSDO();
// String id = sdo.getId();
// ProofingApplyAndLookedVo proofingApplyAndLookedVo = proofingApplyApplication.getProofingApplyAndLookedVoByPAId(id);
// return forward("proofingApply", proofingApplyAndLookedVo);
// }
}
......@@ -42,6 +42,7 @@ public class ProofingMakeController extends CommonController {
public String forwardProofingMake(){
String proofingMakeNo = UUID.randomUUID().toString().replace("-", "");
this.putAttribute("proofingMakeNo", proofingMakeNo);
this.putAttribute("bizId", "proofingMake");
return forward("proofingMake");
}
......
package com.huigou.topsun.proofing.controller;
import com.huigou.topsun.product.application.ProductApplication;
import com.huigou.topsun.proofing.domain.model.ProofingApply;
import com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply;
import com.huigou.topsun.proofing.service.WorkInstrcutionApplyService;
import com.huigou.topsun.resource.vo.ResourceTypeVo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import javax.persistence.Column;
......@@ -20,19 +27,32 @@ public class WorkInstrcutionApplyController extends CommonController {
return "/biz/topsun/proofing/";
}
@Autowired
ProductApplication productApplication;
@Autowired
WorkInstrcutionApplyService workInstrcutionApplyService;
/**
* 打样制作表单页
* @return
*/
public String forwardworkInstrcutionApply(){
public String forwardWorkInstrcutionApply(){
// String proofingMakeNo = UUID.randomUUID().toString().replace("-", "");
// this.putAttribute("proofingMakeNo", proofingMakeNo);
return forward("WorkInstrcutionApply");
return forward("workInstrcutionApply");
}
public static void main(String[] args) {
System.out.println("55f62f778dc711ee8d8e0242ac110003".length());
public String queryWorkInstrcutionApply() {
SDO sdo = this.getSDO();
String productId = sdo.getString("productId");
return toResult(null);
}
/**
* 添加指导申请书
*/
public String saveWorkInstrcutionApply(){
SDO sdo = this.getSDO();
WorkInstrcutionApply workInstrcutionApply = sdo.toObject(WorkInstrcutionApply.class);
workInstrcutionApplyService.saveWorkInstrcutionApply(workInstrcutionApply);
return toResult(workInstrcutionApply);
}
}
......
......@@ -131,17 +131,17 @@ public class ProofingApply extends FlowBillAbstractEntity {
private String proofingApplyTestStandard;
/**
*测试标准
*是否量产
*/
@Column(name = "is_output")
private String isOutput;
/**
*测试标准
*是否外发
*/
@Column(name = "is_out")
private String isOut;
/**
*测试标准
*是否改变
*/
@Column(name = "is_change")
private String isChange;
......
package com.huigou.topsun.proofing.domain.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.*;
import lombok.Data;
/**
......@@ -12,6 +10,7 @@ import lombok.Data;
* @TableName work_instrcution_apply
*/
@Table(name="work_instrcution_apply")
@Entity
@Data
public class WorkInstrcutionApply implements Serializable {
/**
......
......@@ -2,18 +2,14 @@ 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;
/**
* 样品申请与外观
*/
@Data
public class ProofingApplyOrLookedVo extends FlowBillAbstractEntity{
public class ProofingApplyAndLookedVo extends FlowBillAbstractEntity{
/**
* 申请单id
*/
......@@ -34,6 +30,11 @@ public class ProofingApplyOrLookedVo extends FlowBillAbstractEntity{
*/
private String customerId;
/**
* 品牌编号名称
*/
// private String productCategoryName;
/**
* 版面需求时间
*/
......@@ -123,6 +124,11 @@ public class ProofingApplyOrLookedVo extends FlowBillAbstractEntity{
private String isChange;
/**
* 产品类别
*/
private String productCategoryName;
/**
* 长;单位cm
*/
......
......@@ -35,11 +35,39 @@ public class WorkInstrcutionApplyVo implements Serializable {
*/
private String specificationNo;
/**
* 产品类型
*/
private String a;
/**
* 品牌
*/
private String b;
/**
* 采购单位
*/
private String c;
/**
* 换算值
*/
private Integer matrixingValue;
/**
* 产品名称
*/
private String productName;
/**
* 仓库
*/
private String x;
/**
* 尺码组
*/
......
package com.huigou.topsun.proofing.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huigou.topsun.proofing.domain.vo.BomVo;
import org.springframework.data.repository.query.Param;
import java.util.List;
public interface BomMapper extends BaseMapper<BomVo> {
List<BomVo> getBomVoListByProductId(@Param("productId") String productId);
BomVo getBomVoById(@Param("productId")Long id);
}
......@@ -8,4 +8,5 @@ public interface ProofingApplyRepository extends JpaRepository<ProofingApply, St
ProofingApply findByProofingApplyId(String proofingApplyId);
ProofingApply findByProofingApplyNo(String proofingApplyNo);
}
package com.huigou.topsun.proofing.repository;
import com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply;
import org.springframework.data.jpa.repository.JpaRepository;
public interface WorkInstrcutionApplyRepository extends JpaRepository<WorkInstrcutionApply, String> {
}
package com.huigou.topsun.proofing.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huigou.topsun.proofing.domain.vo.BomVo;
import java.util.List;
public interface BomService extends IService<BomVo> {
List<BomVo> getBomVoListByProductId(String productId);
BomVo getBomVoById(Long id);
}
package com.huigou.topsun.proofing.service;
import com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply;
public interface WorkInstrcutionApplyService {
void saveWorkInstrcutionApply(WorkInstrcutionApply workInstrcutionApply);
}
package com.huigou.topsun.proofing.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huigou.topsun.proofing.domain.vo.BomVo;
import com.huigou.topsun.proofing.mapper.BomMapper;
import com.huigou.topsun.proofing.service.BomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class BomServiceImpl extends ServiceImpl<BomMapper, BomVo> implements BomService {
@Autowired
private BomMapper bomMapper;
@Override
public List<BomVo> getBomVoListByProductId(String productId) {
return bomMapper.getBomVoListByProductId(productId);
}
@Override
public BomVo getBomVoById(Long id) {
return bomMapper.getBomVoById(id);
}
}
package com.huigou.topsun.proofing.service.impl;
import com.huigou.topsun.proofing.domain.model.WorkInstrcutionApply;
import com.huigou.topsun.proofing.repository.WorkInstrcutionApplyRepository;
import com.huigou.topsun.proofing.service.WorkInstrcutionApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Service;
@Service
public class WorkInstrcutionApplyServiceImpl implements WorkInstrcutionApplyService {
@Autowired
WorkInstrcutionApplyRepository workInstrcutionApplyRepository;
@Override
public void saveWorkInstrcutionApply(WorkInstrcutionApply workInstrcutionApply) {
workInstrcutionApplyRepository.save(workInstrcutionApply);
}
}
......@@ -2,9 +2,16 @@
<easy-search-mappings>
<easy-search name="productCode" desc="产品">
<sql>select product_id,product_name from product</sql>
<sql>
select p.product_id,p.product_name,pc.product_category_name,b.brand_code
from product p inner join product_category pc on(p.product_category_id=pc.product_category_id)
left join brand b on(b.brand_name=p.brand_name)
</sql>
<field name="产品id" title="产品id" code="productId" width="200" />
<field name="产品名称" title="产品名称" code="productName" width="200" />
<field name="产品类别" title="产品类别" code="productCategoryName" width="200" />
<field name="品牌客户编号" title="品牌客户编号" code="productCategoryName" width="200" />
<!-- <field name="版面" title="版面" code="productCategoryName" width="200" />-->
</easy-search>
<!-- <easy-search name="productType" desc="产品状态" >-->
......
......@@ -6,4 +6,11 @@
<field name="申请单号" title="申请单号" code="proofingApplyNo" width="200" />
<field name="产品编号" title="产品编号" code="productId" width="200" />
</easy-search>
<easy-search name="proofingMakeCode" desc="订单">
<sql>select pa.product_id,pm.proofing_make_no,pa.id from proofing_make pm inner join proofing_apply pa on(pm.proofing_apply_id=pa.id)</sql>
<field name="产品编号" title="产品编号" code="productId" width="200" />
<field name="制作单号" title="制作单号" code="proofingMakeNo" width="200" />
<field name="申请单号" title="申请单号" code="id" width="200" />
</easy-search>
</easy-search-mappings>
\ No newline at end of file
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