修改了部分数据结构
parent
2c894d9565
commit
60839d72da
|
@ -6,9 +6,9 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost: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: sagacity
|
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 = "数量")
|
||||||
|
@ -53,7 +53,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)
|
||||||
|
@ -74,14 +74,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)
|
||||||
{
|
{
|
||||||
|
@ -143,7 +143,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,14 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<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" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="createdAt" column="created_at" />
|
<result property="createdAt" column="created_at" />
|
||||||
<result property="updatedAt" column="updated_at" />
|
|
||||||
<result property="deletedAt" column="deleted_at" />
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOrderInfoVo">
|
<sql id="selectOrderInfoVo">
|
||||||
|
@ -64,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrderListList" resultMap="OrderListResult">
|
<select id="selectOrderListList" resultMap="OrderListResult">
|
||||||
select id, order_id, product_id, quantity, price, amount, remark, created_at, updated_at, deleted_at
|
select id, order_id, product_code, 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>
|
||||||
|
@ -152,9 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</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, deleted_at) values
|
insert into order_list( id, order_id, product_code, quantity, price, amount, remark, created_at, updated_at, 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.remark}, #{item.createdAt}, #{item.updatedAt}, #{item.deletedAt})
|
( #{item.id}, #{item.orderId}, #{item.productCode}, #{item.quantity}, #{item.price}, #{item.amount}, #{item.remark}, #{item.createdAt}, #{item.updatedAt}, #{item.deletedAt})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue