Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
cf4bb5e0
由
康伟
编写于
2024-09-30 16:00:19 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei : 修改药剂入库接口
1 个父辈
cfed6045
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
80 行增加
和
12 行删除
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialINController.java
sk-module-biz/src/main/java/com/skua/modules/erp/entity/MaterialIN.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialAcceptanceFormMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialINMapper.xml
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/MaterialINServiceImpl.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/PurchasePlanItemVO.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialINController.java
查看文件 @
cf4bb5e
...
...
@@ -14,15 +14,14 @@ 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.apache.commons.lang3.StringUtils
;
import
org.jeecgframework.poi.excel.ExcelImportUtil
;
import
org.jeecgframework.poi.excel.def.NormalExcelConstants
;
import
org.jeecgframework.poi.excel.entity.ExportParams
;
...
...
@@ -74,8 +73,28 @@ public class MaterialINController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
MaterialIN
>>
result
=
new
Result
<
IPage
<
MaterialIN
>>();
QueryWrapper
<
MaterialIN
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
materialIN
,
req
.
getParameterMap
());
QueryWrapper
<
MaterialIN
>
queryWrapper
=
new
QueryWrapper
();
//
QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
Page
<
MaterialIN
>
page
=
new
Page
<
MaterialIN
>(
pageNo
,
pageSize
);
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getDepartId
())){
queryWrapper
.
eq
(
"depart_id"
,
materialIN
.
getDepartId
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getAuditStatus
())){
queryWrapper
.
eq
(
"audit_status"
,
materialIN
.
getAuditStatus
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getConfirmStatus
())){
queryWrapper
.
eq
(
"confirm_status"
,
materialIN
.
getConfirmStatus
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getGoodCode
())){
queryWrapper
.
like
(
"good_code"
,
materialIN
.
getGoodCode
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getStartTime
())){
queryWrapper
.
ge
(
"arrive_time"
,
materialIN
.
getStartTime
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getEndTime
())){
queryWrapper
.
le
(
"arrive_time"
,
materialIN
.
getEndTime
());
}
IPage
<
MaterialIN
>
pageList
=
materialINService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
...
...
@@ -89,8 +108,26 @@ public class MaterialINController {
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
MaterialIN
>>
result
=
new
Result
<
IPage
<
MaterialIN
>>();
QueryWrapper
<
MaterialIN
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
materialIN
,
req
.
getParameterMap
());
QueryWrapper
<
MaterialIN
>
queryWrapper
=
new
QueryWrapper
();
//
QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
Page
<
MaterialIN
>
page
=
new
Page
<
MaterialIN
>(
pageNo
,
pageSize
);
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getDepartId
())){
queryWrapper
.
eq
(
"depart_id"
,
materialIN
.
getDepartId
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getAuditStatus
())){
queryWrapper
.
eq
(
"audit_status"
,
materialIN
.
getAuditStatus
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getConfirmStatus
())){
queryWrapper
.
eq
(
"confirm_status"
,
materialIN
.
getConfirmStatus
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getGoodCode
())){
queryWrapper
.
like
(
"good_code"
,
materialIN
.
getGoodCode
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getStartTime
())){
queryWrapper
.
ge
(
"arrive_time"
,
materialIN
.
getStartTime
());
}
if
(
StringUtils
.
isNotBlank
(
materialIN
.
getEndTime
())){
queryWrapper
.
le
(
"arrive_time"
,
materialIN
.
getEndTime
());
}
IPage
<
MaterialIN
>
pageList
=
materialINService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/entity/MaterialIN.java
查看文件 @
cf4bb5e
...
...
@@ -58,6 +58,7 @@ public class MaterialIN {
/**收货人*/
@Excel
(
name
=
"收货人"
,
width
=
15
)
@ApiModelProperty
(
value
=
"收货人"
)
@Dict
(
dictTable
=
"sys_user"
,
dicCode
=
"id"
,
dicText
=
"realname"
)
private
String
receiver
;
@Excel
(
name
=
"物料类别"
,
width
=
15
)
...
...
@@ -134,9 +135,12 @@ public class MaterialIN {
/**审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过*/
@Excel
(
name
=
"审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过"
,
width
=
15
)
@ApiModelProperty
(
value
=
"审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过"
)
@Dict
(
dicCode
=
"
purchase_plan
_status"
)
@Dict
(
dicCode
=
"
audit
_status"
)
private
String
auditStatus
;
/**审批意见*/
@ApiModelProperty
(
value
=
"审批意见"
)
private
String
approveMessage
;
@ApiModelProperty
(
value
=
"申请人"
)
private
String
applyUser
;
...
...
@@ -180,4 +184,11 @@ public class MaterialIN {
@Excel
(
name
=
"删除标识,0:正常,1:删除"
,
width
=
15
)
@ApiModelProperty
(
value
=
"删除标识,0:正常,1:删除"
)
private
Integer
delFlag
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
String
endTime
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"开始时间"
)
private
String
startTime
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialAcceptanceFormMapper.xml
查看文件 @
cf4bb5e
...
...
@@ -2,4 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.skua.modules.erp.mapper.MaterialAcceptanceFormMapper"
>
<select
id=
"queryByList"
resultType=
"com.skua.modules.erp.vo.PurchasePlanItemVO"
>
select
t.arrive_time '到货日期', t.purchase_num '数量',t.measuring_unit '单位' ,
f.appearance_info '外观情况',f.matched_info '匹配情况' ,f.handle_msg '处理意见',f.sender_sign , f.receiver_sign,f.remark ,
t.sparepart_name,t.sparepart_code ,t.sparepart_type,t.specification ,t.depart_id ,
from erp_material_in t
left join erp_material_acceptance_form f on t.id = f.id
where t.supplier_id = 100 and t.depart_id = 'af880d6a13404a67825e94bc0f2f3808'
</select>
</mapper>
\ No newline at end of file
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialINMapper.xml
查看文件 @
cf4bb5e
...
...
@@ -2,4 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.skua.modules.erp.mapper.MaterialINMapper"
>
<!--查询 入库单 -->
<select
id=
"queryByList"
resultType=
"com.skua.modules.erp.entity.MaterialIN"
>
select t.*
from erp_material_in t
where t.supplier_id = 100 and t.depart_id = 'af880d6a13404a67825e94bc0f2f3808'
</select>
</mapper>
\ No newline at end of file
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/DistributContractServiceImpl.java
查看文件 @
cf4bb5e
...
...
@@ -120,7 +120,7 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
distributContractVO
.
setStatus
(
"3"
);
}
if
(
"2"
.
equals
(
distributContractVO
.
getApproveState
()
)){
distributContractVO
.
setStatus
(
"
4
"
);
distributContractVO
.
setStatus
(
"
2
"
);
}
this
.
baseMapper
.
updateById
(
distributContractVO
)
;
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialINServiceImpl.java
查看文件 @
cf4bb5e
...
...
@@ -32,7 +32,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
materialINVO
.
setAuditStatus
(
"3"
);
}
if
(
"2"
.
equals
(
materialINVO
.
getApproveState
()
)){
materialINVO
.
setAuditStatus
(
"
4
"
);
materialINVO
.
setAuditStatus
(
"
2
"
);
}
this
.
baseMapper
.
updateById
(
materialINVO
)
;
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchasePlanServiceImpl.java
查看文件 @
cf4bb5e
...
...
@@ -127,7 +127,7 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur
purchasePlanVO
.
setStatus
(
"3"
);
}
if
(
"2"
.
equals
(
purchasePlanVO
.
getApproveState
()
)){
purchasePlanVO
.
setStatus
(
"
4
"
);
purchasePlanVO
.
setStatus
(
"
2
"
);
//发送入库单据,物料库存增加
warehousing
=
true
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/vo/MaterialINVO.java
查看文件 @
cf4bb5e
...
...
@@ -14,10 +14,7 @@ import lombok.experimental.Accessors;
@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不通过"
)
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/vo/PurchasePlanItemVO.java
0 → 100644
查看文件 @
cf4bb5e
package
com
.
skua
.
modules
.
erp
.
vo
;
/**
* @auther kangwei
* @create 2024-09-30-9:57
*/
public
class
PurchasePlanItemVO
{
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论