Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
3d3fd299
由
康伟
编写于
2024-09-26 11:46:11 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei : 会议纪要文件下载
1 个父辈
f4d0b938
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
41 行增加
和
18 行删除
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhMeetingMinutesController.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
sk-module-biz/src/main/java/com/skua/modules/erp/entity/PurchaseMaterial.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchaseMaterialMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchasePlanMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/vo/PurchasePlanSearchVO.java
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhMeetingMinutesController.java
查看文件 @
3d3fd29
...
...
@@ -26,6 +26,7 @@ import com.skua.modules.ajh.service.IAjhMeetingSendService;
import
com.skua.modules.ajh.service.IAjhMeetingService
;
import
com.skua.modules.guest.util.DateUtil
;
import
com.skua.modules.system.service.ISysConfigService
;
import
com.skua.modules.system.service.ISysUserService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -80,6 +81,9 @@ public class AjhMeetingMinutesController {
@Autowired
private
ISysUserService
userService
;
@Autowired
private
ISysConfigService
sysConfigService
;
/**
* <pre>
...
...
@@ -412,6 +416,7 @@ public class AjhMeetingMinutesController {
//添加图片
// 第三部分:图片
if
(
minutesimage
!=
null
){
File
minutesimageFile
=
new
File
(
minutesimage
);
if
(
minutesimageFile
.
exists
()){
WordImageEntity
img
=
new
WordImageEntity
();
...
...
@@ -423,6 +428,8 @@ public class AjhMeetingMinutesController {
paramMap
.
put
(
"meetingImg"
,
img
);
}
}
//导出word
exportWordData
(
templatePath
,
exportName
,
paramMap
,
response
);
}
...
...
@@ -440,12 +447,15 @@ public class AjhMeetingMinutesController {
try
{
//获取word文档解析对象
File
file
=
new
File
(
templatePath
);
if
(
file
.
exists
()){
inputStream
=
new
FileInputStream
(
templatePath
);
}
else
{
//判断文件是否存在,如果不存在使用默认模板
Resource
resource
=
new
ClassPathResource
(
"templates"
+
File
.
separator
+
"template_AjhMeetingMinutes.docx"
);
inputStream
=
resource
.
getInputStream
();
if
(
!
file
.
exists
()){
////判断文件是否存在,如果不存在使用默认模板
templatePath
=
sysConfigService
.
queryValueByKey
(
"MEETING_MINUTES_TEMPLATE_PATH"
);
//file = new File(bak_templatePath);
//}else{
//inputStream = this.getClass().getResourceAsStream(File.separator +"templates" + File.separator + "template_AjhMeetingMinutes.docx");
//Resource resource = new ClassPathResource("templates" + File.separator + "template_AjhMeetingMinutes.docx");
// inputStream = resource.getInputStream();
}
inputStream
=
new
FileInputStream
(
templatePath
);
//加载模板文件
MyXWPFDocument
document
=
new
MyXWPFDocument
(
inputStream
);
//解析07版的Word并且进行赋值
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
查看文件 @
3d3fd29
...
...
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.modules.erp.service.IPurchaseMaterialService
;
import
com.skua.modules.erp.vo.DistributContractVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
...
...
@@ -75,10 +76,10 @@ public class DistributContractController {
@AutoLog
(
value
=
"erp分销合同-添加"
)
@ApiOperation
(
value
=
"erp分销合同-添加"
,
notes
=
"erp分销合同-添加"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
DistributContract
>
add
(
@RequestBody
DistributContract
distributContract
)
{
Result
<
DistributContract
>
result
=
new
Result
<
DistributContract
>();
public
Result
<
DistributContract
VO
>
add
(
@RequestBody
DistributContractVO
distributContract
)
{
Result
<
DistributContract
VO
>
result
=
new
Result
<
DistributContractVO
>();
try
{
distributContractService
.
save
(
distributContract
);
distributContractService
.
save
DistributContractVO
(
distributContract
);
result
.
success
(
"添加成功!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
...
...
@@ -90,13 +91,13 @@ public class DistributContractController {
@AutoLog
(
value
=
"erp分销合同-编辑"
)
@ApiOperation
(
value
=
"erp分销合同-编辑"
,
notes
=
"erp分销合同-编辑"
)
@PutMapping
(
value
=
"/edit"
)
public
Result
<
DistributContract
>
edit
(
@RequestBody
DistributContract
distributContract
)
{
public
Result
<
DistributContract
>
edit
(
@RequestBody
DistributContract
VO
distributContract
)
{
Result
<
DistributContract
>
result
=
new
Result
<
DistributContract
>();
DistributContract
distributContractEntity
=
distributContractService
.
getById
(
distributContract
.
getId
());
if
(
distributContractEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
boolean
ok
=
distributContractService
.
update
ById
(
distributContract
);
boolean
ok
=
distributContractService
.
update
DistributContractVO
(
distributContract
);
//TODO 返回false说明什么?
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
...
...
@@ -111,7 +112,7 @@ public class DistributContractController {
@DeleteMapping
(
value
=
"/delete"
)
public
Result
<?>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
try
{
distributContractService
.
remove
ById
(
id
);
distributContractService
.
del
ById
(
id
);
}
catch
(
Exception
e
)
{
log
.
error
(
"删除失败"
,
e
.
getMessage
());
return
Result
.
error
(
"删除失败!"
);
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/entity/PurchaseMaterial.java
查看文件 @
3d3fd29
...
...
@@ -96,4 +96,9 @@ public class PurchaseMaterial {
@ApiModelProperty
(
value
=
"厂站名称"
)
private
String
departName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"扩展:采购物料数量"
)
private
String
materialNum
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchaseMaterialMapper.xml
查看文件 @
3d3fd29
...
...
@@ -26,7 +26,7 @@
<if
test=
"goodCode != null and goodCode != ''"
>
AND m.good_code like concat('%', #{goodCode}, '%')
</if>
<if
test=
"
noticeType != null and noticeType
!= ''"
>
<if
test=
"
departId != null and departId
!= ''"
>
AND pc.departs like concat('%', #{departId}, '%')
</if>
) aaa
...
...
@@ -40,15 +40,17 @@
from (
select m.* from erp_purchase_material m , erp_purchase_contract pc where m.contract_id = pc.id
<if
test=
"goodCode != null and goodCode != ''"
>
AND m.good_code like concat('
%
', #{goodCode}, '%')
AND m.good_code like concat('', #{goodCode}, '%')
</if>
<if
test=
"
noticeType != null and noticeType
!= ''"
>
<if
test=
"
departId != null and departId
!= ''"
>
AND pc.departs like concat('%', #{departId}, '%')
</if>
limit 1
) aaa
left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id
left join equipment_sparepart_type st on st.id = aaa.sparepart_type
left join ajh_supplier_manage sm on sm.id = aaa.supplier_id
</select>
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchasePlanMapper.xml
查看文件 @
3d3fd29
...
...
@@ -10,7 +10,11 @@
pp.id = pi.plan_id
<if
test=
"ev.sparepartType != null and ev.sparepartType != '' "
>
and pi.sparepart_type = #{ev.sparepartType}
</if>
<if
test=
"ev.sparepartName != null and ev.sparepartName != '' "
>
</if>
<if
test=
"ev.sparepartCode != null and ev.sparepartCode != '' "
>
AND pi.sparepart_code like concat('%', #{ev.sparepartCode}, '%')
</if>
<if
test=
"ev.sparepartName != null and ev.sparepartName != '' "
>
AND pi.sparepart_name like concat('%', #{ev.sparepartName}, '%')
</if>
<if
test=
"ev.applyYear != null and ev.applyYear != '' "
>
...
...
@@ -28,7 +32,7 @@
group by pi.sparepart_id
)aaa
left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id
left join equipment_sparepart_type st on st.id =
aaa
.sparepart_type
left join equipment_sparepart_type st on st.id =
ss
.sparepart_type
</select>
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
查看文件 @
3d3fd29
...
...
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.skua.modules.erp.entity.PurchaseMaterial
;
import
com.skua.modules.erp.mapper.PurchaseMaterialMapper
;
import
com.skua.modules.erp.service.IPurchaseMaterialService
;
import
com.skua.modules.erp.vo.PurchasePlanSearchVO
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/vo/PurchasePlanSearchVO.java
查看文件 @
3d3fd29
...
...
@@ -25,10 +25,12 @@ public class PurchasePlanSearchVO {
@ApiModelProperty
(
value
=
"物料编号"
)
public
String
sparepartId
;
@ApiModelProperty
(
value
=
"物料Code"
)
public
String
sparepartCode
;
@ApiModelProperty
(
value
=
"权限下的部门编号集合"
)
private
String
departs
;
@ApiModelProperty
(
value
=
"开始时间"
)
private
String
startTime
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论