Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dakong-digital-management
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
dakong-digital-management
Commits
89fbe881
Commit
89fbe881
authored
Aug 24, 2024
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划
parent
ba924539
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1005 additions
and
0 deletions
+1005
-0
TProductPlanController.java
...m/zehong/web/controller/track/TProductPlanController.java
+103
-0
TProductPlan.java
...ain/java/com/zehong/system/domain/track/TProductPlan.java
+121
-0
TProductPlanMapper.java
...va/com/zehong/system/mapper/track/TProductPlanMapper.java
+61
-0
TProductPlanServiceImpl.java
...ng/system/service/impl/track/TProductPlanServiceImpl.java
+97
-0
ITProductPlanService.java
...com/zehong/system/service/track/ITProductPlanService.java
+61
-0
TProductPlanMapper.xml
...em/src/main/resources/mapper/track/TProductPlanMapper.xml
+83
-0
plan.js
digital-management-web/src/api/track/plan.js
+53
-0
DetailInfo.vue
...gement-web/src/views/track/plan/components/DetailInfo.vue
+77
-0
index.vue
digital-management-web/src/views/track/plan/index.vue
+349
-0
No files found.
digital-management-admin/src/main/java/com/zehong/web/controller/track/TProductPlanController.java
0 → 100644
View file @
89fbe881
package
com
.
zehong
.
web
.
controller
.
track
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.track.TProductPlan
;
import
com.zehong.system.service.track.ITProductPlanService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 生产计划Controller
*
* @author zehong
* @date 2024-08-24
*/
@RestController
@RequestMapping
(
"/track/plan"
)
public
class
TProductPlanController
extends
BaseController
{
@Autowired
private
ITProductPlanService
tProductPlanService
;
/**
* 查询生产计划列表
*/
// @PreAuthorize("@ss.hasPermi('system:plan:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TProductPlan
tProductPlan
)
{
startPage
();
List
<
TProductPlan
>
list
=
tProductPlanService
.
selectTProductPlanList
(
tProductPlan
);
return
getDataTable
(
list
);
}
/**
* 导出生产计划列表
*/
//@PreAuthorize("@ss.hasPermi('system:plan:export')")
@Log
(
title
=
"生产计划"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TProductPlan
tProductPlan
)
{
List
<
TProductPlan
>
list
=
tProductPlanService
.
selectTProductPlanList
(
tProductPlan
);
ExcelUtil
<
TProductPlan
>
util
=
new
ExcelUtil
<
TProductPlan
>(
TProductPlan
.
class
);
return
util
.
exportExcel
(
list
,
"生产计划数据"
);
}
/**
* 获取生产计划详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:plan:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
tProductPlanService
.
selectTProductPlanById
(
id
));
}
/**
* 新增生产计划
*/
//@PreAuthorize("@ss.hasPermi('system:plan:add')")
@Log
(
title
=
"生产计划"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TProductPlan
tProductPlan
)
{
return
toAjax
(
tProductPlanService
.
insertTProductPlan
(
tProductPlan
));
}
/**
* 修改生产计划
*/
//@PreAuthorize("@ss.hasPermi('system:plan:edit')")
@Log
(
title
=
"生产计划"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TProductPlan
tProductPlan
)
{
return
toAjax
(
tProductPlanService
.
updateTProductPlan
(
tProductPlan
));
}
/**
* 删除生产计划
*/
//@PreAuthorize("@ss.hasPermi('system:plan:remove')")
@Log
(
title
=
"生产计划"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
tProductPlanService
.
deleteTProductPlanByIds
(
ids
));
}
}
digital-management-system/src/main/java/com/zehong/system/domain/track/TProductPlan.java
0 → 100644
View file @
89fbe881
package
com
.
zehong
.
system
.
domain
.
track
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 生产计划对象 t_product_plan
*
* @author zehong
* @date 2024-08-24
*/
public
class
TProductPlan
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** $column.columnComment */
private
Long
id
;
/** 计划名称 */
@Excel
(
name
=
"计划名称"
)
private
String
title
;
/** 计划编号 */
@Excel
(
name
=
"计划编号"
)
private
String
planNo
;
/** 计划描述 */
@Excel
(
name
=
"计划描述"
)
private
String
content
;
/** 生产总数 */
@Excel
(
name
=
"生产总数"
)
private
Long
total
;
/** 计划状态(数据字典) */
@Excel
(
name
=
"计划状态"
,
dictType
=
"product_plan_status"
)
private
String
status
;
/** 创建人 */
private
Long
createId
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setPlanNo
(
String
planNo
)
{
this
.
planNo
=
planNo
;
}
public
String
getPlanNo
()
{
return
planNo
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setTotal
(
Long
total
)
{
this
.
total
=
total
;
}
public
Long
getTotal
()
{
return
total
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setCreateId
(
Long
createId
)
{
this
.
createId
=
createId
;
}
public
Long
getCreateId
()
{
return
createId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"title"
,
getTitle
())
.
append
(
"planNo"
,
getPlanNo
())
.
append
(
"content"
,
getContent
())
.
append
(
"total"
,
getTotal
())
.
append
(
"status"
,
getStatus
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createId"
,
getCreateId
())
.
toString
();
}
}
digital-management-system/src/main/java/com/zehong/system/mapper/track/TProductPlanMapper.java
0 → 100644
View file @
89fbe881
package
com
.
zehong
.
system
.
mapper
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductPlan
;
/**
* 生产计划Mapper接口
*
* @author zehong
* @date 2024-08-24
*/
public
interface
TProductPlanMapper
{
/**
* 查询生产计划
*
* @param id 生产计划ID
* @return 生产计划
*/
public
TProductPlan
selectTProductPlanById
(
Long
id
);
/**
* 查询生产计划列表
*
* @param tProductPlan 生产计划
* @return 生产计划集合
*/
public
List
<
TProductPlan
>
selectTProductPlanList
(
TProductPlan
tProductPlan
);
/**
* 新增生产计划
*
* @param tProductPlan 生产计划
* @return 结果
*/
public
int
insertTProductPlan
(
TProductPlan
tProductPlan
);
/**
* 修改生产计划
*
* @param tProductPlan 生产计划
* @return 结果
*/
public
int
updateTProductPlan
(
TProductPlan
tProductPlan
);
/**
* 删除生产计划
*
* @param id 生产计划ID
* @return 结果
*/
public
int
deleteTProductPlanById
(
Long
id
);
/**
* 批量删除生产计划
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public
int
deleteTProductPlanByIds
(
Long
[]
ids
);
}
digital-management-system/src/main/java/com/zehong/system/service/impl/track/TProductPlanServiceImpl.java
0 → 100644
View file @
89fbe881
package
com
.
zehong
.
system
.
service
.
impl
.
track
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.track.TProductPlanMapper
;
import
com.zehong.system.domain.track.TProductPlan
;
import
com.zehong.system.service.track.ITProductPlanService
;
/**
* 生产计划Service业务层处理
*
* @author zehong
* @date 2024-08-24
*/
@Service
public
class
TProductPlanServiceImpl
implements
ITProductPlanService
{
@Autowired
private
TProductPlanMapper
tProductPlanMapper
;
/**
* 查询生产计划
*
* @param id 生产计划ID
* @return 生产计划
*/
@Override
public
TProductPlan
selectTProductPlanById
(
Long
id
)
{
return
tProductPlanMapper
.
selectTProductPlanById
(
id
);
}
/**
* 查询生产计划列表
*
* @param tProductPlan 生产计划
* @return 生产计划
*/
@Override
public
List
<
TProductPlan
>
selectTProductPlanList
(
TProductPlan
tProductPlan
)
{
return
tProductPlanMapper
.
selectTProductPlanList
(
tProductPlan
);
}
/**
* 新增生产计划
*
* @param tProductPlan 生产计划
* @return 结果
*/
@Override
public
int
insertTProductPlan
(
TProductPlan
tProductPlan
)
{
tProductPlan
.
setCreateTime
(
DateUtils
.
getNowDate
());
tProductPlan
.
setCreateId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
tProductPlanMapper
.
insertTProductPlan
(
tProductPlan
);
}
/**
* 修改生产计划
*
* @param tProductPlan 生产计划
* @return 结果
*/
@Override
public
int
updateTProductPlan
(
TProductPlan
tProductPlan
)
{
return
tProductPlanMapper
.
updateTProductPlan
(
tProductPlan
);
}
/**
* 批量删除生产计划
*
* @param ids 需要删除的生产计划ID
* @return 结果
*/
@Override
public
int
deleteTProductPlanByIds
(
Long
[]
ids
)
{
return
tProductPlanMapper
.
deleteTProductPlanByIds
(
ids
);
}
/**
* 删除生产计划信息
*
* @param id 生产计划ID
* @return 结果
*/
@Override
public
int
deleteTProductPlanById
(
Long
id
)
{
return
tProductPlanMapper
.
deleteTProductPlanById
(
id
);
}
}
digital-management-system/src/main/java/com/zehong/system/service/track/ITProductPlanService.java
0 → 100644
View file @
89fbe881
package
com
.
zehong
.
system
.
service
.
track
;
import
java.util.List
;
import
com.zehong.system.domain.track.TProductPlan
;
/**
* 生产计划Service接口
*
* @author zehong
* @date 2024-08-24
*/
public
interface
ITProductPlanService
{
/**
* 查询生产计划
*
* @param id 生产计划ID
* @return 生产计划
*/
public
TProductPlan
selectTProductPlanById
(
Long
id
);
/**
* 查询生产计划列表
*
* @param tProductPlan 生产计划
* @return 生产计划集合
*/
public
List
<
TProductPlan
>
selectTProductPlanList
(
TProductPlan
tProductPlan
);
/**
* 新增生产计划
*
* @param tProductPlan 生产计划
* @return 结果
*/
public
int
insertTProductPlan
(
TProductPlan
tProductPlan
);
/**
* 修改生产计划
*
* @param tProductPlan 生产计划
* @return 结果
*/
public
int
updateTProductPlan
(
TProductPlan
tProductPlan
);
/**
* 批量删除生产计划
*
* @param ids 需要删除的生产计划ID
* @return 结果
*/
public
int
deleteTProductPlanByIds
(
Long
[]
ids
);
/**
* 删除生产计划信息
*
* @param id 生产计划ID
* @return 结果
*/
public
int
deleteTProductPlanById
(
Long
id
);
}
digital-management-system/src/main/resources/mapper/track/TProductPlanMapper.xml
0 → 100644
View file @
89fbe881
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.track.TProductPlanMapper"
>
<resultMap
type=
"TProductPlan"
id=
"TProductPlanResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"planNo"
column=
"plan_no"
/>
<result
property=
"content"
column=
"content"
/>
<result
property=
"total"
column=
"total"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createId"
column=
"create_id"
/>
</resultMap>
<sql
id=
"selectTProductPlanVo"
>
select id, title, plan_no, content, total, status, create_time, create_id,
<include
refid=
"Common.createBy"
/>
from t_product_plan
</sql>
<select
id=
"selectTProductPlanList"
parameterType=
"TProductPlan"
resultMap=
"TProductPlanResult"
>
<include
refid=
"selectTProductPlanVo"
/>
<where>
<if
test=
"title != null and title != ''"
>
and title like concat('%', #{title}, '%')
</if>
<if
test=
"planNo != null and planNo != ''"
>
and plan_no like concat('%', #{planNo}, '%')
</if>
<if
test=
"status != null and status != ''"
>
and status = #{status}
</if>
</where>
order by create_time desc
</select>
<select
id=
"selectTProductPlanById"
parameterType=
"Long"
resultMap=
"TProductPlanResult"
>
<include
refid=
"selectTProductPlanVo"
/>
where id = #{id}
</select>
<insert
id=
"insertTProductPlan"
parameterType=
"TProductPlan"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_product_plan
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"planNo != null"
>
plan_no,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"total != null"
>
total,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createId != null"
>
create_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"title != null"
>
#{title},
</if>
<if
test=
"planNo != null"
>
#{planNo},
</if>
<if
test=
"content != null"
>
#{content},
</if>
<if
test=
"total != null"
>
#{total},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createId != null"
>
#{createId},
</if>
</trim>
</insert>
<update
id=
"updateTProductPlan"
parameterType=
"TProductPlan"
>
update t_product_plan
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"title != null"
>
title = #{title},
</if>
<if
test=
"planNo != null"
>
plan_no = #{planNo},
</if>
<if
test=
"content != null"
>
content = #{content},
</if>
<if
test=
"total != null"
>
total = #{total},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createId != null"
>
create_id = #{createId},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteTProductPlanById"
parameterType=
"Long"
>
delete from t_product_plan where id = #{id}
</delete>
<delete
id=
"deleteTProductPlanByIds"
parameterType=
"String"
>
delete from t_product_plan where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
digital-management-web/src/api/track/plan.js
0 → 100644
View file @
89fbe881
import
request
from
'@/utils/request'
// 查询生产计划列表
export
function
listPlan
(
query
)
{
return
request
({
url
:
'/track/plan/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询生产计划详细
export
function
getPlan
(
id
)
{
return
request
({
url
:
'/track/plan/'
+
id
,
method
:
'get'
})
}
// 新增生产计划
export
function
addPlan
(
data
)
{
return
request
({
url
:
'/track/plan'
,
method
:
'post'
,
data
:
data
})
}
// 修改生产计划
export
function
updatePlan
(
data
)
{
return
request
({
url
:
'/track/plan'
,
method
:
'put'
,
data
:
data
})
}
// 删除生产计划
export
function
delPlan
(
id
)
{
return
request
({
url
:
'/track/plan/'
+
id
,
method
:
'delete'
})
}
// 导出生产计划
export
function
exportPlan
(
query
)
{
return
request
({
url
:
'/track/plan/export'
,
method
:
'get'
,
params
:
query
})
}
digital-management-web/src/views/track/plan/components/DetailInfo.vue
0 → 100644
View file @
89fbe881
<
template
>
<el-dialog
title=
"详情"
:visible
.
sync=
"detailOpen"
width=
"800px"
append-to-body
destroy-on-close
:close-on-click-modal=
"false"
>
<el-form
label-width=
"90px"
>
<el-row
class=
"el-row-table"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"计划名称"
>
<span
v-if=
"detailInfo.title"
>
{{
detailInfo
.
title
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"计划编号"
>
<span
v-if=
"detailInfo.planNo"
>
{{
detailInfo
.
planNo
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"生产总数"
>
<span
v-if=
"detailInfo.total"
>
{{
detailInfo
.
total
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
>
<span
v-if=
"detailInfo.createTime"
>
{{
detailInfo
.
createTime
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
>
<span
v-if=
"detailInfo.createBy"
>
{{
detailInfo
.
createBy
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"计划描述"
>
<span
v-if=
"detailInfo.content"
>
{{
detailInfo
.
content
}}
</span>
<span
v-else
>
-
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</
template
>
<
script
>
import
{
getPlan
}
from
"@/api/track/plan"
;
export
default
{
name
:
"detail-info"
,
data
(){
return
{
detailOpen
:
false
,
detailInfo
:
{}
}
},
methods
:{
getDetailInfo
(
id
){
getPlan
(
id
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
detailInfo
=
res
.
data
;
this
.
detailOpen
=
true
;
}
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
digital-management-web/src/views/track/plan/index.vue
0 → 100644
View file @
89fbe881
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment