Compare commits
2 Commits
07daa8bcc5
...
23afe6f58b
Author | SHA1 | Date |
---|---|---|
|
23afe6f58b | |
|
60839d72da |
|
@ -8,7 +8,7 @@ spring:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://121.199.168.157:3306/unis_pms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://121.199.168.157:3306/unis_pms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: unis@db
|
password: unis@db
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
@ -170,11 +170,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productId',
|
field: 'productCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '产品编码',
|
title: 'BOM编码',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].productId' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].productCode' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -214,33 +214,6 @@
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'createdAt',
|
|
||||||
align: 'center',
|
|
||||||
title: '创建时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].createdAt' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'updatedAt',
|
|
||||||
align: 'center',
|
|
||||||
title: '更新时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].updatedAt' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'deletedAt',
|
|
||||||
align: 'center',
|
|
||||||
title: '删除时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].deletedAt' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|
|
@ -172,11 +172,11 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productId',
|
field: 'productCode',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '产品编码',
|
title: 'BOM编码',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].productId' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].productCode' value='%s'>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -221,36 +221,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
field: 'createdAt',
|
|
||||||
align: 'center',
|
|
||||||
title: '创建时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].createdAt' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
field: 'updatedAt',
|
|
||||||
align: 'center',
|
|
||||||
title: '更新时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].updatedAt' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
field: 'deletedAt',
|
|
||||||
align: 'center',
|
|
||||||
title: '删除时间',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='orderListList[%s].deletedAt' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'orderCode',
|
field: 'orderCode',
|
||||||
title: '合同编号,唯一'
|
title: '合同编号'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'versionCode',
|
field: 'versionCode',
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<form class="form-horizontal m" id="form-product-add">
|
<form class="form-horizontal m" id="form-product-add">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品编码:</label>
|
<label class="col-sm-3 control-label is-required">BOM编码:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="productCode" class="form-control" type="text" required>
|
<input name="productCode" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品代码:</label>
|
<label class="col-sm-3 control-label is-required">产品型号:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="model" class="form-control" type="text" required>
|
<input name="model" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<input name="id" th:field="*{id}" type="hidden">
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品编码:</label>
|
<label class="col-sm-3 control-label is-required">BOM编码:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="productCode" th:field="*{productCode}" class="form-control" type="text" required>
|
<input name="productCode" th:field="*{productCode}" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产品代码:</label>
|
<label class="col-sm-3 control-label is-required">产品型号:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="model" th:field="*{model}" class="form-control" type="text" required>
|
<input name="model" th:field="*{model}" class="form-control" type="text" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>产品编码:</label>
|
<label>BOM编码:</label>
|
||||||
<input type="text" name="productCode"/>
|
<input type="text" name="productCode"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<input type="text" name="productName"/>
|
<input type="text" name="productName"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>产品代码:</label>
|
<label>产品型号:</label>
|
||||||
<input type="text" name="model"/>
|
<input type="text" name="model"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productCode',
|
field: 'productCode',
|
||||||
title: '产品编码'
|
title: 'BOM编码'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productName',
|
field: 'productName',
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'model',
|
field: 'model',
|
||||||
title: '产品代码'
|
title: '产品型号'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'description',
|
field: 'description',
|
||||||
|
|
|
@ -25,7 +25,7 @@ public class OrderInfo extends BaseEntity
|
||||||
private String projectCode;
|
private String projectCode;
|
||||||
|
|
||||||
/** 合同编号,唯一 */
|
/** 合同编号,唯一 */
|
||||||
@Excel(name = "合同编号,唯一")
|
@Excel(name = "合同编号")
|
||||||
private String orderCode;
|
private String orderCode;
|
||||||
|
|
||||||
/** 版本号 */
|
/** 版本号 */
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class OrderList extends BaseEntity
|
||||||
|
|
||||||
/** 产品编码,关联产品编码表 */
|
/** 产品编码,关联产品编码表 */
|
||||||
@Excel(name = "产品编码,关联产品编码表")
|
@Excel(name = "产品编码,关联产品编码表")
|
||||||
private Long productId;
|
private String productCode;
|
||||||
|
|
||||||
/** 数量 */
|
/** 数量 */
|
||||||
@Excel(name = "数量")
|
@Excel(name = "数量")
|
||||||
|
@ -55,7 +55,7 @@ public class OrderList extends BaseEntity
|
||||||
|
|
||||||
/** 删除时间,软删除 */
|
/** 删除时间,软删除 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
@Excel(name = "删除时间,软删除", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date deletedAt;
|
private Date deletedAt;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
|
@ -76,14 +76,14 @@ public class OrderList extends BaseEntity
|
||||||
{
|
{
|
||||||
return orderId;
|
return orderId;
|
||||||
}
|
}
|
||||||
public void setProductId(Long productId)
|
public void setProductCode(String productCode)
|
||||||
{
|
{
|
||||||
this.productId = productId;
|
this.productCode = productCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getProductId()
|
public String getProductCode()
|
||||||
{
|
{
|
||||||
return productId;
|
return productCode;
|
||||||
}
|
}
|
||||||
public void setQuantity(Long quantity)
|
public void setQuantity(Long quantity)
|
||||||
{
|
{
|
||||||
|
@ -153,7 +153,7 @@ public class OrderList extends BaseEntity
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("orderId", getOrderId())
|
.append("orderId", getOrderId())
|
||||||
.append("productId", getProductId())
|
.append("productCode", getProductCode())
|
||||||
.append("quantity", getQuantity())
|
.append("quantity", getQuantity())
|
||||||
.append("price", getPrice())
|
.append("price", getPrice())
|
||||||
.append("amount", getAmount())
|
.append("amount", getAmount())
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<resultMap type="OrderList" id="OrderListResult">
|
<resultMap type="OrderList" id="OrderListResult">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="orderId" column="order_id"/>
|
<result property="orderId" column="order_id"/>
|
||||||
<result property="productId" column="product_id"/>
|
<result property="productCode" column="product_code"/>
|
||||||
<result property="quantity" column="quantity"/>
|
<result property="quantity" column="quantity"/>
|
||||||
<result property="price" column="price"/>
|
<result property="price" column="price"/>
|
||||||
<result property="amount" column="amount"/>
|
<result property="amount" column="amount"/>
|
||||||
|
@ -101,16 +101,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrderListList" resultMap="OrderListResult">
|
<select id="selectOrderListList" resultMap="OrderListResult">
|
||||||
select id,
|
select id, order_id, product_code, quantity, price, amount, remark, created_at, updated_at, deleted_at
|
||||||
order_id,
|
|
||||||
product_id,
|
|
||||||
quantity,
|
|
||||||
price,
|
|
||||||
amount,
|
|
||||||
remark,
|
|
||||||
created_at,
|
|
||||||
updated_at,
|
|
||||||
deleted_at
|
|
||||||
from order_list
|
from order_list
|
||||||
where order_id = #{order_id}
|
where order_id = #{order_id}
|
||||||
</select>
|
</select>
|
||||||
|
@ -225,11 +216,9 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batchOrderList">
|
<insert id="batchOrderList">
|
||||||
insert into order_list( id, order_id, product_id, quantity, price, amount, remark, created_at, updated_at,
|
insert into order_list( id, order_id, product_code, quantity, price, amount, remark, created_at, updated_at, deleted_at) values
|
||||||
deleted_at) values
|
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.id}, #{item.orderId}, #{item.productId}, #{item.quantity}, #{item.price}, #{item.amount},
|
( #{item.id}, #{item.orderId}, #{item.productCode}, #{item.quantity}, #{item.price}, #{item.amount}, #{item.remark}, #{item.createdAt}, #{item.updatedAt}, #{item.deletedAt})
|
||||||
#{item.remark}, #{item.createdAt}, #{item.updatedAt}, #{item.deletedAt})
|
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue