Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
b4852c8b
由
康伟
编写于
6 months ago
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei : 在线考试以及采购入库相关接口
1 个父辈
c81a246a
master
...
dev-group-zfst
dev-zhangfa
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
329 行增加
和
109 行删除
sk-module-biz/src/main/java/com/skua/modules/edu/controller/PaperController.java
sk-module-biz/src/main/java/com/skua/modules/edu/controller/UserPaperController.java
sk-module-biz/src/main/java/com/skua/modules/edu/entity/Paper.java
sk-module-biz/src/main/java/com/skua/modules/edu/mapper/xml/PaperMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/ErpCommonController.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialAcceptanceFormController.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialINController.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/PurchaseContractController.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/PurchasePlanController.java
sk-module-biz/src/main/java/com/skua/modules/erp/entity/DistributMaterial.java
sk-module-biz/src/main/java/com/skua/modules/erp/entity/ERPPurchaseContract.java
sk-module-biz/src/main/java/com/skua/modules/erp/entity/MaterialIN.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/PurchaseMaterialMapper.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/service/IMaterialINService.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/IPurchaseMaterialService.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/DistributContractServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/ERPPurchaseContractServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialINServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchasePlanServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/vo/MaterialINVO.java
sk-module-biz/src/main/java/com/skua/modules/erp/vo/PurchaseContractVO.java
sk-module-equipment/src/main/java/com/skua/modules/supplies/entity/EquipmentSparepartSupplies.java
sk-module-biz/src/main/java/com/skua/modules/edu/controller/PaperController.java
查看文件 @
b4852c8
...
...
@@ -10,9 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.service.ISequenceService
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.edu.entity.Paper
;
import
com.skua.modules.edu.service.IPaperService
;
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/edu/controller/UserPaperController.java
查看文件 @
b4852c8
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.util.DateUtils
;
import
com.skua.modules.common.service.ICommonSqlService
;
import
com.skua.modules.edu.entity.*
;
import
com.skua.modules.edu.service.IPaperService
;
...
...
@@ -67,8 +68,8 @@ public class UserPaperController {
queryWrapper.ge("end_time",currentDate);
IPage<Paper> pageList = paperService.page(page, queryWrapper);*/
paper
.
setUserId
(
BaseContextHandler
.
getUserId
());
paper
.
setStartTime
(
DateUtil
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
paper
.
setEndTime
(
DateUtil
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
)
);
paper
.
setStartTime
(
DateUtil
s
.
now
(
));
paper
.
setEndTime
(
DateUtil
s
.
now
(
)
);
IPage
<
Paper
>
pageList
=
paperService
.
queryMyPaperByList
(
page
,
paper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
...
...
@@ -133,7 +134,7 @@ public class UserPaperController {
Result
<
UserPaperVO
>
result
=
new
Result
<
UserPaperVO
>();
String
paperScore
=
"0"
;
try
{
userPaperVO
.
setEndTime
(
DateUtil
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
userPaperVO
.
setEndTime
(
DateUtil
s
.
now
(
));
userPaperVO
.
setUserId
(
BaseContextHandler
.
getUserId
());
//考试人编号
paperScore
=
paperService
.
submitPaper
(
userPaperVO
);
userPaperVO
.
setScore
(
paperScore
);
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/edu/entity/Paper.java
查看文件 @
b4852c8
...
...
@@ -148,5 +148,12 @@ public class Paper {
@ApiModelProperty
(
value
=
"扩展:用户考试试卷编号"
)
private
String
userPaperId
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"别名:试卷编号"
)
private
String
paperId
;
public
String
getPaperId
()
{
return
id
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/edu/mapper/xml/PaperMapper.xml
查看文件 @
b4852c8
...
...
@@ -4,21 +4,21 @@
<!-- 我的考试列表 -->
<select
id=
"queryMyPaperByList"
resultType=
"com.skua.modules.edu.entity.Paper"
>
select aaa.* from (
select d.depart_name , IFNULL(up.user_id,0) 'user_id',
p.* ,( select count(1) from edu_user_paper up where up.paper_id = p.id ) 'user_count'
from edu_paper p
left join sys_depart d on p.depart_id = d.id
left join edu_user_paper up on p.id = up.paper_id and up.user_id = #{param.userId}
where
p.send_status =1
<if
test=
"param.userId != null and param.user
Id !=''"
>
and p.exam_user_ids like CONCAT('%',#{param.userId},'%')
</if>
<if
test=
"param.departId != null and param.departId !=''"
>
and p.depart_id = #{param.departId}
</if>
)
aaa where aaa.user_id > 0
select d.depart_name ,p.*,( select count(1) from edu_user_paper up where up.paper_id = p.id ) 'user_count'
from edu_paper p
left join sys_depart d on p.depart_id = d.id
where
p.send_status =1
<if
test=
"param.userId != null and param.userId !=''"
>
and p.exam_user_ids like CONCAT('%',#{param.userId},'%')
</if>
<if
test=
"param.departId != null and param.depart
Id !=''"
>
and p.depart_id = #{param.departId}
</if>
and p.id NOT in ( select DISTINCT p1.id
from edu_user_paper up , edu_paper p1
where up.paper_id = p1.id and up.user_id = #{param.userId}
)
<!-- <if test="param.startTime != null and param.startTime !=''">
and p.start_time <= #{param.startTime}
</if>
...
...
@@ -34,6 +34,4 @@
where up.user_id = #{param.userId}
order by up.start_time desc
</select>
</mapper>
\ No newline at end of file
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
查看文件 @
b4852c8
...
...
@@ -165,6 +165,37 @@ public class DistributContractController {
}
@AutoLog
(
value
=
"erp分销合同-通过id查询"
)
@ApiOperation
(
value
=
"erp分销合同-通过id查询"
,
notes
=
"erp分销合同-通过id查询"
)
@GetMapping
(
value
=
"/sendAudit"
)
public
Result
<
DistributContractVO
>
sendAudit
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
DistributContractVO
>
result
=
new
Result
<
DistributContractVO
>();
DistributContractVO
distributContract
=
distributContractService
.
queryById
(
id
);
if
(
distributContract
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
distributContract
.
setStatus
(
"1"
);
distributContractService
.
updateById
(
distributContract
);
result
.
setResult
(
distributContract
);
result
.
setSuccess
(
true
);
}
return
result
;
}
@AutoLog
(
value
=
"erp分销合同-审批"
)
@ApiOperation
(
value
=
"erp分销合同-审批"
,
notes
=
"erp分销合同-审批"
)
@PutMapping
(
value
=
"/audit"
)
public
Result
<
DistributContract
>
audit
(
@RequestBody
DistributContractVO
distributContract
)
{
Result
<
DistributContract
>
result
=
new
Result
<
DistributContract
>();
try
{
distributContractService
.
auditDistributContract
(
distributContract
);
}
catch
(
Exception
e
)
{
log
.
error
(
"审批失败"
,
e
.
getMessage
());
result
.
setResult
(
distributContract
);
result
.
setSuccess
(
true
);
}
return
result
;
}
@AutoLog
(
value
=
"erp分销合同-采购物料列表"
)
@ApiOperation
(
value
=
"erp分销合同-采购物料列表"
,
notes
=
"erp分销合同-采购物料列表"
)
@GetMapping
(
value
=
"/purchaseMaterialList"
)
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/controller/ErpCommonController.java
查看文件 @
b4852c8
...
...
@@ -77,12 +77,14 @@ public class ErpCommonController {
@ApiOperation
(
value
=
"ERP-采购合同--物料清单药剂入库使用()"
,
notes
=
"ERP-采购合同--物料清单(药剂入库使用)"
)
@RequestMapping
(
value
=
"/queryPurchaseMaterialListByIn"
,
method
=
RequestMethod
.
GET
)
public
Result
<
IPage
<
PurchaseMaterialVO
>>
queryPurchaseMaterialListByIn
(
MaterialSearchVO
materialSearchVO
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
PurchaseMaterialVO
>>
result
=
new
Result
<
IPage
<
PurchaseMaterialVO
>>();
Page
<
PurchaseMaterialVO
>
page
=
new
Page
<
PurchaseMaterialVO
>(
pageNo
,
pageSize
);
String
departId
=
BaseContextHandler
.
getRealDepartId
();
//当前部门编号
IPage
<
PurchaseMaterialVO
>
pageList
=
purchaseMaterialService
.
queryPurchaseMaterialListByIn
(
page
,
departId
);
//String departId = BaseContextHandler.getRealDepartId();//当前部门编号
materialSearchVO
.
setDepartId
(
BaseContextHandler
.
getRealDepartId
()
);
IPage
<
PurchaseMaterialVO
>
pageList
=
purchaseMaterialService
.
queryPurchaseMaterialListByIn
(
page
,
materialSearchVO
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialAcceptanceFormController.java
查看文件 @
b4852c8
...
...
@@ -19,6 +19,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
import
org.jeecgframework.poi.excel.def.NormalExcelConstants
;
import
org.jeecgframework.poi.excel.entity.ExportParams
;
...
...
@@ -42,7 +43,7 @@ import io.swagger.annotations.ApiOperation;
* @version V0.1, 开发时间
*/
@Slf4j
@Api
(
tags
=
"物料验收单"
)
@Api
(
tags
=
"
erp--
物料验收单"
)
@RestController
(
"webMaterialAcceptanceFormController"
)
@RequestMapping
(
"/web/erp/materialAcceptanceForm"
)
public
class
MaterialAcceptanceFormController
{
...
...
@@ -62,8 +63,8 @@ public class MaterialAcceptanceFormController {
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料验收单-分页列表查询"
)
@ApiOperation
(
value
=
"
物料验收单-分页列表查询"
,
notes
=
"
物料验收单-分页列表查询"
)
@AutoLog
(
value
=
"
erp--
物料验收单-分页列表查询"
)
@ApiOperation
(
value
=
"
erp--物料验收单-分页列表查询"
,
notes
=
"erp--
物料验收单-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
MaterialAcceptanceForm
>>
queryPageList
(
MaterialAcceptanceForm
materialAcceptanceForm
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
...
...
@@ -87,12 +88,16 @@ public class MaterialAcceptanceFormController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料验收单-添加"
)
@ApiOperation
(
value
=
"
物料验收单-添加"
,
notes
=
"
物料验收单-添加"
)
@AutoLog
(
value
=
"
erp--
物料验收单-添加"
)
@ApiOperation
(
value
=
"
erp--物料验收单-添加"
,
notes
=
"erp--
物料验收单-添加"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
MaterialAcceptanceForm
>
add
(
@RequestBody
MaterialAcceptanceForm
materialAcceptanceForm
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
try
{
materialAcceptanceForm
.
setConfirmStatus
(
"1"
);
if
(
StringUtils
.
isNotBlank
(
materialAcceptanceForm
.
getSenderSign
())
&&
StringUtils
.
isNotBlank
(
materialAcceptanceForm
.
getReceiverSign
())
){
materialAcceptanceForm
.
setConfirmStatus
(
"2"
);
}
materialAcceptanceFormService
.
save
(
materialAcceptanceForm
);
result
.
success
(
"添加成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -110,8 +115,8 @@ public class MaterialAcceptanceFormController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料验收单-编辑"
)
@ApiOperation
(
value
=
"
物料验收单-编辑"
,
notes
=
"
物料验收单-编辑"
)
@AutoLog
(
value
=
"
erp--
物料验收单-编辑"
)
@ApiOperation
(
value
=
"
erp--物料验收单-编辑"
,
notes
=
"erp--
物料验收单-编辑"
)
@PutMapping
(
value
=
"/edit"
)
public
Result
<
MaterialAcceptanceForm
>
edit
(
@RequestBody
MaterialAcceptanceForm
materialAcceptanceForm
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
...
...
@@ -125,9 +130,10 @@ public class MaterialAcceptanceFormController {
result
.
success
(
"修改成功!"
);
}
}
return
result
;
}
/**
* <pre>
* 通过id删除
...
...
@@ -137,8 +143,8 @@ public class MaterialAcceptanceFormController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料验收单-通过id删除"
)
@ApiOperation
(
value
=
"
物料验收单-通过id删除"
,
notes
=
"
物料验收单-通过id删除"
)
@AutoLog
(
value
=
"
erp--
物料验收单-通过id删除"
)
@ApiOperation
(
value
=
"
erp--物料验收单-通过id删除"
,
notes
=
"erp--
物料验收单-通过id删除"
)
@DeleteMapping
(
value
=
"/delete"
)
public
Result
<?>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
try
{
...
...
@@ -149,29 +155,6 @@ public class MaterialAcceptanceFormController {
}
return
Result
.
ok
(
"删除成功!"
);
}
/**
* <pre>
* 批量删除
* </pre>
* @param ids
* @return
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料验收单-批量删除"
)
@ApiOperation
(
value
=
"物料验收单-批量删除"
,
notes
=
"物料验收单-批量删除"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
public
Result
<
MaterialAcceptanceForm
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
if
(
ids
==
null
||
""
.
equals
(
ids
.
trim
()))
{
result
.
error500
(
"参数不识别!"
);
}
else
{
this
.
materialAcceptanceFormService
.
removeByIds
(
Arrays
.
asList
(
ids
.
split
(
","
)));
result
.
success
(
"删除成功!"
);
}
return
result
;
}
/**
* <pre>
* 通过id查询
...
...
@@ -181,8 +164,8 @@ public class MaterialAcceptanceFormController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料验收单-通过id查询"
)
@ApiOperation
(
value
=
"
物料验收单-通过id查询"
,
notes
=
"
物料验收单-通过id查询"
)
@AutoLog
(
value
=
"
erp--
物料验收单-通过id查询"
)
@ApiOperation
(
value
=
"
erp--物料验收单-通过id查询"
,
notes
=
"erp--
物料验收单-通过id查询"
)
@GetMapping
(
value
=
"/queryById"
)
public
Result
<
MaterialAcceptanceForm
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
...
...
@@ -195,6 +178,53 @@ public class MaterialAcceptanceFormController {
}
return
result
;
}
@AutoLog
(
value
=
"erp--物料验收单-送货/供方人员签字"
)
@ApiOperation
(
value
=
"erp--物料验收单-送货/供方人员签字"
,
notes
=
"erp--物料验收单-送货/供方人员签字"
)
@PutMapping
(
value
=
"/senderSign"
)
public
Result
<
MaterialAcceptanceForm
>
senderSign
(
@RequestBody
MaterialAcceptanceForm
acceptanceForm
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
MaterialAcceptanceForm
materialAcceptanceFormEntity
=
materialAcceptanceFormService
.
getById
(
acceptanceForm
.
getId
());
if
(
materialAcceptanceFormEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
acceptanceForm
.
setConfirmStatus
(
"1"
);
if
(
StringUtils
.
isNotBlank
(
acceptanceForm
.
getSenderSign
())
&&
StringUtils
.
isNotBlank
(
acceptanceForm
.
getReceiverSign
())
){
acceptanceForm
.
setConfirmStatus
(
"2"
);
}
boolean
ok
=
materialAcceptanceFormService
.
updateById
(
acceptanceForm
);
//TODO 返回false说明什么?
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
}
}
return
result
;
}
@AutoLog
(
value
=
"erp--物料验收单-收货人员签字"
)
@ApiOperation
(
value
=
"erp--物料验收单-收货人员签字"
,
notes
=
"erp--物料验收单-收货人员签字"
)
@PutMapping
(
value
=
"/receiverSign"
)
public
Result
<
MaterialAcceptanceForm
>
receiverSign
(
@RequestBody
MaterialAcceptanceForm
acceptanceForm
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
MaterialAcceptanceForm
materialAcceptanceFormEntity
=
materialAcceptanceFormService
.
getById
(
acceptanceForm
.
getId
());
if
(
materialAcceptanceFormEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
acceptanceForm
.
setConfirmStatus
(
"1"
);
if
(
StringUtils
.
isNotBlank
(
acceptanceForm
.
getSenderSign
())
&&
StringUtils
.
isNotBlank
(
acceptanceForm
.
getReceiverSign
())
){
acceptanceForm
.
setConfirmStatus
(
"2"
);
}
boolean
ok
=
materialAcceptanceFormService
.
updateById
(
acceptanceForm
);
//TODO 返回false说明什么?
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
}
}
return
result
;
}
/**
* <pre>
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialINController.java
查看文件 @
b4852c8
...
...
@@ -10,13 +10,17 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.erp.entity.MaterialIN
;
import
com.skua.modules.erp.entity.PurchasePlan
;
import
com.skua.modules.erp.service.IMaterialINService
;
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.vo.MaterialINVO
;
import
com.skua.modules.erp.vo.PurchaseContractVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
...
...
@@ -42,7 +46,7 @@ import io.swagger.annotations.ApiOperation;
* @version V0.1, 开发时间
*/
@Slf4j
@Api
(
tags
=
"物料(药剂)入库"
)
@Api
(
tags
=
"
erp-
物料(药剂)入库"
)
@RestController
(
"webMaterialINController"
)
@RequestMapping
(
"/web/erp/materialIN"
)
public
class
MaterialINController
{
...
...
@@ -62,8 +66,8 @@ public class MaterialINController {
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料(药剂)入库-分页列表查询"
)
@ApiOperation
(
value
=
"
物料(药剂)入库-分页列表查询"
,
notes
=
"
物料(药剂)入库-分页列表查询"
)
@AutoLog
(
value
=
"
erp--
物料(药剂)入库-分页列表查询"
)
@ApiOperation
(
value
=
"
erp--物料(药剂)入库-分页列表查询"
,
notes
=
"erp--
物料(药剂)入库-分页列表查询"
)
@GetMapping
(
value
=
"/list"
)
public
Result
<
IPage
<
MaterialIN
>>
queryPageList
(
MaterialIN
materialIN
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
...
...
@@ -87,8 +91,8 @@ public class MaterialINController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料(药剂)入库-添加"
)
@ApiOperation
(
value
=
"
物料(药剂)入库-添加"
,
notes
=
"
物料(药剂)入库-添加"
)
@AutoLog
(
value
=
"
erp--
物料(药剂)入库-添加"
)
@ApiOperation
(
value
=
"
erp--物料(药剂)入库-添加"
,
notes
=
"erp--
物料(药剂)入库-添加"
)
@PostMapping
(
value
=
"/add"
)
public
Result
<
MaterialIN
>
add
(
@RequestBody
MaterialIN
materialIN
)
{
Result
<
MaterialIN
>
result
=
new
Result
<
MaterialIN
>();
...
...
@@ -110,8 +114,8 @@ public class MaterialINController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料(药剂)入库-编辑"
)
@ApiOperation
(
value
=
"
物料(药剂)入库-编辑"
,
notes
=
"
物料(药剂)入库-编辑"
)
@AutoLog
(
value
=
"
erp--
物料(药剂)入库-编辑"
)
@ApiOperation
(
value
=
"
erp--物料(药剂)入库-编辑"
,
notes
=
"erp--
物料(药剂)入库-编辑"
)
@PutMapping
(
value
=
"/edit"
)
public
Result
<
MaterialIN
>
edit
(
@RequestBody
MaterialIN
materialIN
)
{
Result
<
MaterialIN
>
result
=
new
Result
<
MaterialIN
>();
...
...
@@ -125,7 +129,6 @@ public class MaterialINController {
result
.
success
(
"修改成功!"
);
}
}
return
result
;
}
/**
...
...
@@ -137,8 +140,8 @@ public class MaterialINController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料(药剂)入库-通过id删除"
)
@ApiOperation
(
value
=
"
物料(药剂)入库-通过id删除"
,
notes
=
"
物料(药剂)入库-通过id删除"
)
@AutoLog
(
value
=
"
erp--
物料(药剂)入库-通过id删除"
)
@ApiOperation
(
value
=
"
erp--物料(药剂)入库-通过id删除"
,
notes
=
"erp--
物料(药剂)入库-通过id删除"
)
@DeleteMapping
(
value
=
"/delete"
)
public
Result
<?>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
try
{
...
...
@@ -159,8 +162,8 @@ public class MaterialINController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料(药剂)入库-批量删除"
)
@ApiOperation
(
value
=
"
物料(药剂)入库-批量删除"
,
notes
=
"
物料(药剂)入库-批量删除"
)
@AutoLog
(
value
=
"
erp--
物料(药剂)入库-批量删除"
)
@ApiOperation
(
value
=
"
erp--物料(药剂)入库-批量删除"
,
notes
=
"erp--
物料(药剂)入库-批量删除"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
public
Result
<
MaterialIN
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
Result
<
MaterialIN
>
result
=
new
Result
<
MaterialIN
>();
...
...
@@ -181,8 +184,8 @@ public class MaterialINController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@AutoLog
(
value
=
"物料(药剂)入库-通过id查询"
)
@ApiOperation
(
value
=
"
物料(药剂)入库-通过id查询"
,
notes
=
"
物料(药剂)入库-通过id查询"
)
@AutoLog
(
value
=
"
erp--
物料(药剂)入库-通过id查询"
)
@ApiOperation
(
value
=
"
erp--物料(药剂)入库-通过id查询"
,
notes
=
"erp--
物料(药剂)入库-通过id查询"
)
@GetMapping
(
value
=
"/queryById"
)
public
Result
<
MaterialIN
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
MaterialIN
>
result
=
new
Result
<
MaterialIN
>();
...
...
@@ -196,6 +199,43 @@ public class MaterialINController {
return
result
;
}
@AutoLog
(
value
=
"erp--药剂入库-送审"
)
@ApiOperation
(
value
=
"erp--药剂入库-送审"
,
notes
=
"erp--药剂入库-送审"
)
@GetMapping
(
value
=
"/sendAudit"
)
public
Result
<
MaterialIN
>
sendAudit
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
MaterialIN
>
result
=
new
Result
<
MaterialIN
>();
MaterialIN
materialIN
=
null
;
try
{
materialIN
=
materialINService
.
getById
(
id
);
if
(
materialIN
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
materialIN
.
setAuditStatus
(
"1"
);
//提交审核
materialIN
.
setApplyUser
(
BaseContextHandler
.
getUserId
());
materialINService
.
updateById
(
materialIN
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"送审失败"
,
e
.
getMessage
());
result
.
setResult
(
materialIN
);
result
.
setSuccess
(
true
);
}
return
result
;
}
@AutoLog
(
value
=
"erp--erp采购合同-审批"
)
@ApiOperation
(
value
=
"erp--采购合同-审批"
,
notes
=
"erp--采购合同-审批"
)
@PutMapping
(
value
=
"/audit"
)
public
Result
<
MaterialINVO
>
auditMaterialINVO
(
@RequestBody
MaterialINVO
materialINVO
)
{
Result
<
MaterialINVO
>
result
=
new
Result
<
MaterialINVO
>();
try
{
materialINService
.
auditMaterialINVO
(
materialINVO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"审批失败"
,
e
.
getMessage
());
result
.
setResult
(
materialINVO
);
result
.
setSuccess
(
true
);
}
return
result
;
}
/**
* <pre>
* 导出excel
...
...
@@ -206,7 +246,6 @@ public class MaterialINController {
* @author 开发者姓名, 开发时间
* @Description: TODO(这里描述这个方法的需求变更情况)
*/
@RequestMapping
(
value
=
"/exportXls"
)
public
ModelAndView
exportXls
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
// Step.1 组装查询条件
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/controller/PurchaseContractController.java
查看文件 @
b4852c8
package
com
.
skua
.
modules
.
erp
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
cn.hutool.core.date.DateUtil
;
import
com.skua.core.api.vo.Result
;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.util.DateUtils
;
import
com.skua.modules.erp.entity.ERPPurchaseContract
;
import
com.skua.modules.erp.service.IEROPurchaseContractService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -15,6 +19,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.modules.erp.vo.PurchaseContractVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
io.swagger.annotations.Api
;
...
...
@@ -168,6 +173,25 @@ public class PurchaseContractController {
}
return
result
;
}
@AutoLog
(
value
=
"erp采购合同-送审"
)
@ApiOperation
(
value
=
"erp采购合同-送审"
,
notes
=
"erp采购合同-送审"
)
@GetMapping
(
value
=
"/sendAudit"
)
public
Result
<
PurchaseContractVO
>
sendAudit
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
PurchaseContractVO
>
result
=
new
Result
<
PurchaseContractVO
>();
PurchaseContractVO
purchaseContract
=
purchaseContractService
.
queryById
(
id
);
if
(
purchaseContract
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
purchaseContract
.
setStatus
(
"1"
);
purchaseContract
.
setApplyUser
(
BaseContextHandler
.
getUserId
());
purchaseContract
.
setApplyTime
(
DateUtils
.
now
());
purchaseContractService
.
updateById
(
purchaseContract
);
result
.
setResult
(
purchaseContract
);
result
.
setSuccess
(
true
);
}
return
result
;
}
@AutoLog
(
value
=
"erp采购合同-审批"
)
@ApiOperation
(
value
=
"erp采购合同-审批"
,
notes
=
"erp采购合同-审批"
)
@PutMapping
(
value
=
"/audit"
)
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/controller/PurchasePlanController.java
查看文件 @
b4852c8
...
...
@@ -12,6 +12,7 @@ import com.skua.core.context.BaseContextHandler;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.service.ISequenceService
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.core.util.DateUtils
;
import
com.skua.modules.erp.entity.PurchaseMaterial
;
import
com.skua.modules.erp.entity.PurchasePlan
;
import
com.skua.modules.erp.entity.PurchasePlanItem
;
...
...
@@ -247,9 +248,12 @@ public class PurchasePlanController {
PurchasePlan
purchasePlan
=
null
;
try
{
purchasePlan
=
purchasePlanService
.
getById
(
id
);
purchasePlan
.
setStatus
(
"1"
);
//提交审核
if
(
purchasePlan
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
purchasePlan
.
setStatus
(
"1"
);
//提交审核
purchasePlan
.
setApplyTime
(
DateUtils
.
now
());
purchasePlanService
.
updateById
(
purchasePlan
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"送审失败"
,
e
.
getMessage
());
...
...
@@ -259,8 +263,6 @@ public class PurchasePlanController {
return
result
;
}
@AutoLog
(
value
=
"erp采购计划表-审批"
)
@ApiOperation
(
value
=
"erp采购计划表-审批"
,
notes
=
"erp采购计划表-审批"
)
@PutMapping
(
value
=
"/audit"
)
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/entity/DistributMaterial.java
查看文件 @
b4852c8
...
...
@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@ApiModel
(
value
=
"erp_distribut_material对象"
,
description
=
"erp分销物料"
)
public
class
DistributMaterial
{
/**主键*/
@TableId
(
type
=
IdType
.
ID_WORKER_STR
)
@TableId
(
type
=
IdType
.
UUID
)
@ApiModelProperty
(
value
=
"主键"
)
private
String
id
;
/**分销合同编号*/
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/entity/ERPPurchaseContract.java
查看文件 @
b4852c8
package
com
.
skua
.
modules
.
erp
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.skua.core.aspect.annotation.Dict
;
...
...
@@ -30,6 +31,7 @@ public class ERPPurchaseContract {
/**厂站*/
@Excel
(
name
=
"厂站"
,
width
=
15
)
@ApiModelProperty
(
value
=
"厂站"
)
@Dict
(
dictTable
=
"sys_depart"
,
dicCode
=
"id"
,
dicText
=
"depart_name"
)
private
java
.
lang
.
String
departId
;
/**采购名称*/
@Excel
(
name
=
"采购名称"
,
width
=
15
)
...
...
@@ -70,13 +72,14 @@ public class ERPPurchaseContract {
@ApiModelProperty
(
value
=
"使用机构编码集合"
)
private
java
.
lang
.
String
departs
;
/**入库仓库编号*/
@Excel
(
name
=
"入库仓库编号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"入库仓库编号"
)
@Dict
(
dicCode
=
"id"
,
dicText
=
"warehouse_name"
,
dictTable
=
"supplies_warehouse"
)
private
java
.
lang
.
String
inWarehouseId
;
@ApiModelProperty
(
value
=
"入库仓库名称"
)
private
java
.
lang
.
String
inWarehouseName
;
/**合同附件*/
@Excel
(
name
=
"合同附件"
,
width
=
15
)
@ApiModelProperty
(
value
=
"合同附件"
)
...
...
@@ -131,4 +134,8 @@ public class ERPPurchaseContract {
@ApiModelProperty
(
value
=
"删除标识,0:有效,1:删除"
)
private
String
equipmentInId
;
/**审批意见*/
@ApiModelProperty
(
value
=
"审批意见"
)
private
String
approveMessage
;
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/entity/MaterialIN.java
查看文件 @
b4852c8
...
...
@@ -59,6 +59,10 @@ public class MaterialIN {
@Excel
(
name
=
"收货人"
,
width
=
15
)
@ApiModelProperty
(
value
=
"收货人"
)
private
String
receiver
;
@Excel
(
name
=
"物料类别"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物料类别"
)
private
String
sparepartType
;
/**物料编号*/
@Excel
(
name
=
"物料编号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物料编号"
)
...
...
@@ -67,6 +71,9 @@ public class MaterialIN {
@Excel
(
name
=
"药剂(物料)名称"
,
width
=
15
)
@ApiModelProperty
(
value
=
"药剂(物料)名称"
)
private
String
sparepartName
;
@ApiModelProperty
(
value
=
"物料类别"
)
private
String
sparepartCode
;
/**规格型号*/
@Excel
(
name
=
"规格型号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"规格型号"
)
...
...
@@ -126,6 +133,10 @@ public class MaterialIN {
@ApiModelProperty
(
value
=
"审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过"
)
@Dict
(
dicCode
=
"purchase_plan_status"
)
private
String
auditStatus
;
@ApiModelProperty
(
value
=
"申请人"
)
private
String
applyUser
;
/**入库类型*/
@Excel
(
name
=
"入库类型"
,
width
=
15
)
@ApiModelProperty
(
value
=
"入库类型"
)
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/entity/PurchaseMaterial.java
查看文件 @
b4852c8
...
...
@@ -27,7 +27,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
public
class
PurchaseMaterial
{
/**主键*/
@TableId
(
type
=
IdType
.
ID_WORKER_STR
)
@TableId
(
type
=
IdType
.
UUID
)
@ApiModelProperty
(
value
=
"主键"
)
private
java
.
lang
.
String
id
;
/**采购计划编号*/
...
...
@@ -42,6 +42,10 @@ public class PurchaseMaterial {
@Excel
(
name
=
"物料编号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"物料编号"
)
private
java
.
lang
.
String
sparepartId
;
@ApiModelProperty
(
value
=
"物料编码"
)
private
java
.
lang
.
String
sparepartCode
;
@ApiModelProperty
(
value
=
"物料名称"
)
private
java
.
lang
.
String
sparepartName
;
/**物料编号*/
@Excel
(
name
=
"货号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"货号"
)
...
...
@@ -78,15 +82,8 @@ public class PurchaseMaterial {
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"物料类别名称"
)
private
String
sparepartCode
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"物料类别名称"
)
private
String
sparepartTypeName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"物料名称"
)
private
String
sparepartName
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"供应商名称"
)
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/PurchaseMaterialMapper.java
查看文件 @
b4852c8
...
...
@@ -5,6 +5,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.modules.erp.entity.DistributContract
;
import
com.skua.modules.erp.vo.MaterialSearchVO
;
import
com.skua.modules.erp.vo.PurchaseMaterialVO
;
import
com.skua.modules.erp.vo.PurchasePlanSearchVO
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -60,8 +61,8 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> {
/**
* 药剂入库查询结果:物料清单
* @param
departId
* @param
materialSearchVO
* @return
*/
public
IPage
<
PurchaseMaterialVO
>
queryPurchaseMaterialListByIn
(
Page
<
PurchaseMaterialVO
>
page
,
@Param
(
"
departId"
)
String
departId
);
public
IPage
<
PurchaseMaterialVO
>
queryPurchaseMaterialListByIn
(
Page
<
PurchaseMaterialVO
>
page
,
@Param
(
"
param"
)
MaterialSearchVO
materialSearchVO
);
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchaseMaterialMapper.xml
查看文件 @
b4852c8
...
...
@@ -64,13 +64,21 @@
<!-- 药剂入库查询结果:物料清单-->
<select
id=
"queryPurchaseMaterialListByIn"
resultType=
"com.skua.modules.erp.vo.PurchaseMaterialVO"
>
select dm.distribut_price ,dm.distribut_total_price ,aaa.* from (
select dm.distribut_price ,dm.distribut_total_price ,ss.sparepart_name, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name',
aaa.* from (
select pm.*
from erp_purchase_material pm , erp_purchase_contract pc
where pm.contract_id =pc.id
and pc.departs like concat('%', #{departId}, '%')
and pc.departs like concat('%', #{param.departId}, '%')
<if
test=
"param.sparepartCode != null and param.sparepartCode !=''"
>
and pm.sparepart_code =#{param.sparepartCode}
</if>
<if
test=
"param.sparepartType != null and param.sparepartType !=''"
>
and pm.sparepart_type = #{param.sparepartType}
</if>
<if
test=
"param.sparepartName != null and param.sparepartName !=''"
>
and pm.sparepart_name like concat('%', #{param.sparepartName}, '%')
</if>
)aaa
left join erp_distribut_material dm on aaa.good_code = dm.good_code
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>
</mapper>
\ No newline at end of file
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/IMaterialINService.java
查看文件 @
b4852c8
...
...
@@ -2,10 +2,16 @@ package com.skua.modules.erp.service;
import
com.skua.modules.erp.entity.MaterialIN
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.skua.modules.erp.vo.MaterialINVO
;
/**
* 物料(药剂)入库
*/
public
interface
IMaterialINService
extends
IService
<
MaterialIN
>
{
/***
* 审核药剂入库单
* @param materialINVO
*/
public
void
auditMaterialINVO
(
MaterialINVO
materialINVO
);
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/IPurchaseMaterialService.java
查看文件 @
b4852c8
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.skua.modules.erp.entity.DistributContract
;
import
com.skua.modules.erp.entity.PurchaseMaterial
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.skua.modules.erp.vo.MaterialSearchVO
;
import
com.skua.modules.erp.vo.PurchaseMaterialVO
;
import
com.skua.modules.erp.vo.PurchasePlanSearchVO
;
...
...
@@ -34,8 +35,7 @@ public interface IPurchaseMaterialService extends IService<PurchaseMaterial> {
/**
* 药剂入库查询结果:采购物料清单+分销单价+分销总价
* @param departId
* @return
*/
public
IPage
<
PurchaseMaterialVO
>
queryPurchaseMaterialListByIn
(
Page
<
PurchaseMaterialVO
>
page
,
String
departId
);
public
IPage
<
PurchaseMaterialVO
>
queryPurchaseMaterialListByIn
(
Page
<
PurchaseMaterialVO
>
page
,
MaterialSearchVO
materialSearchVO
);
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/DistributContractServiceImpl.java
查看文件 @
b4852c8
...
...
@@ -41,6 +41,7 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
int
count
=
this
.
baseMapper
.
insert
(
distributContractVO
);
if
(
count
>
0
&&
distributContractVO
.
getMaterialList
()
!=
null
&&
!
distributContractVO
.
getMaterialList
().
isEmpty
()){
for
(
DistributMaterial
material
:
distributContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
distributContractVO
.
getId
()
);
materialMapper
.
insert
(
material
);
}
...
...
@@ -61,6 +62,7 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
if
(
count
>
0
&&
distributContractVO
.
getMaterialList
()
!=
null
&&
!
distributContractVO
.
getMaterialList
().
isEmpty
()){
for
(
DistributMaterial
material
:
distributContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
distributContractVO
.
getId
()
);
materialMapper
.
insert
(
material
);
}
...
...
@@ -127,12 +129,13 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
if
(
distributContractVO
.
getMaterialList
()
!=
null
&&
!
distributContractVO
.
getMaterialList
().
isEmpty
()){
for
(
DistributMaterial
material
:
distributContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
distributContractVO
.
getId
()
);
materialMapper
.
insert
(
material
);
}
}
//审批记录
ApproveRecord
record
=
new
ApproveRecord
(
"
FX
HT"
,
distributContractVO
.
getApplyUser
(),
distributContractVO
.
getId
(),
BaseContextHandler
.
getUserId
(),
distributContractVO
.
getApproveMessage
(),
distributContractVO
.
getApproveState
());
ApproveRecord
record
=
new
ApproveRecord
(
"
DIS_
HT"
,
distributContractVO
.
getApplyUser
(),
distributContractVO
.
getId
(),
BaseContextHandler
.
getUserId
(),
distributContractVO
.
getApproveMessage
(),
distributContractVO
.
getApproveState
());
recordMapper
.
insert
(
record
)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/ERPPurchaseContractServiceImpl.java
查看文件 @
b4852c8
...
...
@@ -68,6 +68,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
int
count
=
this
.
baseMapper
.
insert
(
purchaseContractVO
);
if
(
count
>
0
&&
purchaseContractVO
.
getMaterialList
()
!=
null
&&
!
purchaseContractVO
.
getMaterialList
().
isEmpty
()){
for
(
PurchaseMaterial
material
:
purchaseContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
purchaseContractVO
.
getId
()
);
purchaseMaterialMapper
.
insert
(
material
);
}
...
...
@@ -89,6 +90,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
if
(
count
>
0
&&
purchaseContractVO
.
getMaterialList
()
!=
null
&&
!
purchaseContractVO
.
getMaterialList
().
isEmpty
()){
for
(
PurchaseMaterial
material
:
purchaseContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
purchaseContractVO
.
getId
()
);
purchaseMaterialMapper
.
insert
(
material
);
}
...
...
@@ -154,6 +156,7 @@ public class ERPPurchaseContractServiceImpl extends ServiceImpl<ERPPurchaseContr
if
(
purchaseContractVO
.
getMaterialList
()
!=
null
&&
!
purchaseContractVO
.
getMaterialList
().
isEmpty
()){
for
(
PurchaseMaterial
material
:
purchaseContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
purchaseContractVO
.
getId
()
);
purchaseMaterialMapper
.
insert
(
material
);
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialINServiceImpl.java
查看文件 @
b4852c8
package
com
.
skua
.
modules
.
erp
.
service
.
impl
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.modules.erp.entity.ApproveRecord
;
import
com.skua.modules.erp.entity.MaterialIN
;
import
com.skua.modules.erp.mapper.ApproveRecordMapper
;
import
com.skua.modules.erp.mapper.MaterialINMapper
;
import
com.skua.modules.erp.service.IMaterialINService
;
import
com.skua.modules.erp.vo.MaterialINVO
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
javax.annotation.Resource
;
/**
* 物料(药剂)入库
*/
@Service
public
class
MaterialINServiceImpl
extends
ServiceImpl
<
MaterialINMapper
,
MaterialIN
>
implements
IMaterialINService
{
@Resource
private
ApproveRecordMapper
recordMapper
;
/***
* 审核药剂入库单
* @param materialINVO
*/
public
void
auditMaterialINVO
(
MaterialINVO
materialINVO
){
//保存
//purchasePlan.getApproveState() 审批状态 1通过2不通过
if
(
"1"
.
equals
(
materialINVO
.
getApproveState
()
)){
materialINVO
.
setAuditStatus
(
"3"
);
}
if
(
"2"
.
equals
(
materialINVO
.
getApproveState
()
)){
materialINVO
.
setAuditStatus
(
"4"
);
}
this
.
baseMapper
.
updateById
(
materialINVO
)
;
//审批记录
ApproveRecord
record
=
new
ApproveRecord
(
"YJIN"
,
materialINVO
.
getApplyUser
(),
materialINVO
.
getId
(),
BaseContextHandler
.
getUserId
(),
materialINVO
.
getApproveMessage
(),
materialINVO
.
getApproveState
());
recordMapper
.
insert
(
record
)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
查看文件 @
b4852c8
...
...
@@ -5,6 +5,7 @@ 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.MaterialSearchVO
;
import
com.skua.modules.erp.vo.PurchaseMaterialVO
;
import
org.springframework.stereotype.Service
;
...
...
@@ -39,11 +40,10 @@ public class PurchaseMaterialServiceImpl extends ServiceImpl<PurchaseMaterialMap
}
/**
* 药剂入库查询结果:采购物料清单+分销单价+分销总价
* @param departId
* @return
*/
public
IPage
<
PurchaseMaterialVO
>
queryPurchaseMaterialListByIn
(
Page
<
PurchaseMaterialVO
>
page
,
String
departId
){
return
this
.
baseMapper
.
queryPurchaseMaterialListByIn
(
page
,
departId
)
;
public
IPage
<
PurchaseMaterialVO
>
queryPurchaseMaterialListByIn
(
Page
<
PurchaseMaterialVO
>
page
,
MaterialSearchVO
materialSearchVO
){
return
this
.
baseMapper
.
queryPurchaseMaterialListByIn
(
page
,
materialSearchVO
)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchasePlanServiceImpl.java
查看文件 @
b4852c8
...
...
@@ -43,6 +43,7 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur
int
count
=
this
.
baseMapper
.
insert
(
purchasePlanVO
);
if
(
count
>
0
&&
purchasePlanVO
.
getPlanItemList
()
!=
null
&&
!
purchasePlanVO
.
getPlanItemList
().
isEmpty
()){
for
(
PurchasePlanItem
planItem
:
purchasePlanVO
.
getPlanItemList
()){
planItem
.
setId
(
null
);
planItem
.
setPlanId
(
purchasePlanVO
.
getId
()
);
planItemMapper
.
insert
(
planItem
);
}
...
...
@@ -64,6 +65,7 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur
if
(
purchasePlanVO
.
getPlanItemList
()
!=
null
&&
!
purchasePlanVO
.
getPlanItemList
().
isEmpty
()){
for
(
PurchasePlanItem
planItem
:
purchasePlanVO
.
getPlanItemList
()){
planItem
.
setId
(
null
);
planItem
.
setPlanId
(
purchasePlanVO
.
getId
()
);
planItemMapper
.
insert
(
planItem
);
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/vo/MaterialINVO.java
0 → 100644
查看文件 @
b4852c8
package
com
.
skua
.
modules
.
erp
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.skua.modules.erp.entity.MaterialIN
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@ApiModel
(
value
=
"MaterialINVO查询对象"
,
description
=
"MaterialINVO查询对象"
)
public
class
MaterialINVO
extends
MaterialIN
{
/**审批意见*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"审批意见"
)
private
String
approveMessage
;
/**审批状态*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"审批状态 1通过2不通过"
)
private
String
approveState
;
}
This diff is collapsed.
Click to expand it.
sk-module-biz/src/main/java/com/skua/modules/erp/vo/PurchaseContractVO.java
查看文件 @
b4852c8
...
...
@@ -24,13 +24,9 @@ public class PurchaseContractVO extends ERPPurchaseContract {
@ApiModelProperty
(
value
=
"采购合同物料清单集合"
)
private
List
<
PurchaseMaterial
>
materialList
=
null
;
/**审批意见*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"审批意见"
)
private
String
approveMessage
;
/**审批状态*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"审批状态 1通过2不通过"
)
private
String
approveState
;
}
...
...
This diff is collapsed.
Click to expand it.
sk-module-equipment/src/main/java/com/skua/modules/supplies/entity/EquipmentSparepartSupplies.java
查看文件 @
b4852c8
...
...
@@ -243,24 +243,26 @@ public class EquipmentSparepartSupplies {
@ApiModelProperty
(
value
=
"物料类别名称"
)
@ApiModelProperty
(
value
=
"
扩展:
物料类别名称"
)
@TableField
(
exist
=
false
)
private
String
sparepartTypeName
;
@ApiModelProperty
(
value
=
"去年出库数量"
)
@ApiModelProperty
(
value
=
"
扩展:
去年出库数量"
)
@TableField
(
exist
=
false
)
private
String
outNum
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"总价"
)
@ApiModelProperty
(
value
=
"
扩展:
总价"
)
private
String
totalPrice
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"计划采购数量"
)
@ApiModelProperty
(
value
=
"
扩展:
计划采购数量"
)
private
String
purchaseNum
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"计划采购数量"
)
@ApiModelProperty
(
value
=
"扩展:货号"
)
private
String
goodCode
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"扩展:计划采购数量"
)
private
String
sparepartId
;
public
String
getSparepartId
()
{
...
...
This diff is collapsed.
Click to expand it.
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论