修改了部分数据结构

master
mula.liu 2025-04-11 15:26:42 +08:00
parent 2c894d9565
commit 60839d72da
10 changed files with 29 additions and 88 deletions

View File

@ -6,9 +6,9 @@ spring:
druid:
# 主库数据源
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
password: sagacity
password: unis@db
# 从库数据源
slave:
# 从数据源开关/默认关闭

View File

@ -170,11 +170,11 @@
}
},
{
field: 'productId',
field: 'productCode',
align: 'center',
title: '产品编码',
title: 'BOM编码',
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;
}
},
@ -214,33 +214,6 @@
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: '操作',
align: 'center',

View File

@ -172,11 +172,11 @@
}
},
{
field: 'productId',
field: 'productCode',
align: 'center',
title: '产品编码',
title: 'BOM编码',
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;
}
},
@ -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: '操作',
align: 'center',

View File

@ -82,7 +82,7 @@
},
{
field: 'orderCode',
title: '合同编号,唯一'
title: '合同编号'
},
{
field: 'versionCode',

View File

@ -9,7 +9,7 @@
<form class="form-horizontal m" id="form-product-add">
<div class="col-xs-12">
<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">
<input name="productCode" class="form-control" type="text" required>
</div>
@ -25,7 +25,7 @@
</div>
<div class="col-xs-12">
<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">
<input name="model" class="form-control" type="text" required>
</div>

View File

@ -9,7 +9,7 @@
<input name="id" th:field="*{id}" type="hidden">
<div class="col-xs-12">
<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">
<input name="productCode" th:field="*{productCode}" class="form-control" type="text" required>
</div>
@ -25,7 +25,7 @@
</div>
<div class="col-xs-12">
<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">
<input name="model" th:field="*{model}" class="form-control" type="text" required>
</div>

View File

@ -11,7 +11,7 @@
<div class="select-list">
<ul>
<li>
<label>产品编码:</label>
<label>BOM编码:</label>
<input type="text" name="productCode"/>
</li>
<li>
@ -19,7 +19,7 @@
<input type="text" name="productName"/>
</li>
<li>
<label>产品代码</label>
<label>产品型号</label>
<input type="text" name="model"/>
</li>
<li>
@ -74,7 +74,7 @@
},
{
field: 'productCode',
title: '产品编码'
title: 'BOM编码'
},
{
field: 'productName',
@ -82,7 +82,7 @@
},
{
field: 'model',
title: '产品代码'
title: '产品型号'
},
{
field: 'description',

View File

@ -25,7 +25,7 @@ public class OrderInfo extends BaseEntity
private String projectCode;
/** 合同编号,唯一 */
@Excel(name = "合同编号,唯一")
@Excel(name = "合同编号")
private String orderCode;
/** 版本号 */

View File

@ -27,7 +27,7 @@ public class OrderList extends BaseEntity
/** 产品编码,关联产品编码表 */
@Excel(name = "产品编码,关联产品编码表")
private Long productId;
private String productCode;
/** 数量 */
@Excel(name = "数量")
@ -53,7 +53,7 @@ public class OrderList extends BaseEntity
/** 删除时间,软删除 */
@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;
public void setId(Long id)
@ -74,14 +74,14 @@ public class OrderList extends BaseEntity
{
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)
{
@ -143,7 +143,7 @@ public class OrderList extends BaseEntity
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("orderId", getOrderId())
.append("productId", getProductId())
.append("productCode", getProductCode())
.append("quantity", getQuantity())
.append("price", getPrice())
.append("amount", getAmount())

View File

@ -32,14 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="OrderList" id="OrderListResult">
<result property="id" column="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="price" column="price" />
<result property="amount" column="amount" />
<result property="remark" column="remark" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
<result property="deletedAt" column="deleted_at" />
</resultMap>
<sql id="selectOrderInfoVo">
@ -64,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<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
where order_id = #{order_id}
</select>
@ -152,9 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<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=",">
( #{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>
</insert>