Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
131938af
由
康伟
编写于
2025-01-06 14:00:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei: 解决mybaitsPlus的getById,时有时无的问题
1 个父辈
7c9c329e
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
61 行增加
和
16 行删除
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/entity/MaterialIN.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/MaterialINMapper.java
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/IMaterialINService.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/controller/MaterialAcceptanceFormController.java
查看文件 @
131938a
...
...
@@ -211,8 +211,8 @@ public class MaterialAcceptanceFormController {
@AutoLog
(
value
=
"erp--物料验收单-送货/供方人员签字"
)
@ApiOperation
(
value
=
"erp--物料验收单-送货/供方人员签字"
,
notes
=
"erp--物料验收单-送货/供方人员签字"
)
@PutMapping
(
value
=
"/senderSign"
)
public
Result
<
MaterialAcceptanceForm
>
senderSign
(
@RequestBody
MaterialAcceptanceForm
a
cceptanceForm
)
{
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
public
Result
<
MaterialAcceptanceForm
>
senderSign
(
@RequestBody
MaterialAcceptanceForm
materialA
cceptanceForm
)
{
/*R
MaterialAcceptanceForm materialAcceptanceFormEntity = materialAcceptanceFormService.getById(acceptanceForm.getId());
if(materialAcceptanceFormEntity==null) {
result.error500("未找到对应实体");
...
...
@@ -223,7 +223,30 @@ public class MaterialAcceptanceFormController {
if(ok) {
result.success("修改成功!");
}
}*/
Result
<
MaterialAcceptanceForm
>
result
=
new
Result
<
MaterialAcceptanceForm
>();
if
(
StringUtils
.
isNotBlank
(
materialAcceptanceForm
.
getReceiverSign
())){
materialAcceptanceForm
.
setConfirmStatus
(
"1"
);
}
if
(
StringUtils
.
isNotBlank
(
materialAcceptanceForm
.
getSenderSign
())){
materialAcceptanceForm
.
setConfirmStatus
(
"2"
);
}
if
(
StringUtils
.
isNotEmpty
(
materialAcceptanceForm
.
getSenderSign
())
&&
StringUtils
.
isNotEmpty
(
materialAcceptanceForm
.
getReceiverSign
())
){
materialAcceptanceForm
.
setConfirmStatus
(
"9"
);
}
MaterialAcceptanceForm
acceptanceForm
=
materialAcceptanceFormService
.
getById
(
materialAcceptanceForm
.
getId
());
if
(
acceptanceForm
==
null
)
{
//result.error500("未找到对应实体");
materialAcceptanceFormService
.
save
(
materialAcceptanceForm
);
}
else
{
materialAcceptanceFormService
.
updateById
(
materialAcceptanceForm
);
}
MaterialIN
materialIN
=
materialINService
.
getById
(
materialAcceptanceForm
.
getId
());
materialIN
.
setConfirmStatus
(
materialAcceptanceForm
.
getConfirmStatus
());
materialINService
.
updateById
(
materialIN
);
result
.
setResult
(
materialAcceptanceForm
);
result
.
success
(
"修改成功!"
);
return
result
;
}
@AutoLog
(
value
=
"erp--物料验收单-收货人员签字"
)
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialINController.java
查看文件 @
131938a
...
...
@@ -291,24 +291,15 @@ public class MaterialINController {
@GetMapping
(
value
=
"/queryById"
)
public
Result
<
MaterialIN
>
queryById
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
MaterialIN
>
result
=
new
Result
<
MaterialIN
>();
MaterialIN
materialIN
=
materialINService
.
getById
(
id
);
MaterialIN
materialIN
=
materialINService
.
queryById
(
id
);
/**/
if
(
materialIN
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
SupplierManage
supplier
=
supplierManageService
.
getById
(
materialIN
.
getSupplierId
());
if
(
supplier
!=
null
){
materialIN
.
setSupplierName
(
supplier
.
getSuppName
()
);
}
EquipmentSparepartType
sparepartType
=
sparepartTypeService
.
getById
(
materialIN
.
getSparepartType
());
if
(
sparepartType
!=
null
){
materialIN
.
setSparepartTypeName
(
sparepartType
.
getItemText
()
);
}
result
.
setResult
(
materialIN
);
result
.
setSuccess
(
true
);
}
return
result
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/entity/MaterialIN.java
查看文件 @
131938a
...
...
@@ -218,4 +218,8 @@ public class MaterialIN {
@ApiModelProperty
(
value
=
"供应商名称"
)
private
String
supplierName
;
@TableField
(
exist
=
false
)
@Excel
(
name
=
"机构/部门名称"
,
width
=
15
)
private
String
departName
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/MaterialINMapper.java
查看文件 @
131938a
...
...
@@ -3,8 +3,8 @@ package com.skua.modules.erp.mapper;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.skua.modules.erp.vo.AgentiaStatisticsVO
;
import
com.skua.modules.erp.vo.ArrivalRecordExcelExportVO
;
import
com.skua.tool.annotation.Anonymous
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.erp.entity.MaterialIN
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -29,5 +29,6 @@ public interface MaterialINMapper extends BaseMapper<MaterialIN> {
*/
List
<
MaterialIN
>
selectAuditMaterialINByPage
(
IPage
<
MaterialIN
>
page
,
@Param
(
"materialIN"
)
MaterialIN
materialIN
);
public
MaterialIN
queryById
(
String
id
);
@Anonymous
public
MaterialIN
queryById
(
@Param
(
"id"
)
String
id
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialINMapper.xml
0 → 100644
查看文件 @
131938a
<?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.skua.modules.erp.mapper.MaterialINMapper"
>
<select
id=
"queryById"
resultType=
"com.skua.modules.erp.entity.MaterialIN"
>
select d.depart_name 'departName', st.item_text 'sparepartTypeName', sm.supp_name 'supplierName', t.* from erp_material_in t
left join sys_depart d on t.depart_id = d.id
left join equipment_sparepart_type st on st.id = t.sparepart_type
left join ajh_supplier_manage sm on sm.id = t.supplier_id
where t.id = #{id}
</select>
</mapper>
sk-module-biz/src/main/java/com/skua/modules/erp/service/IMaterialINService.java
查看文件 @
131938a
...
...
@@ -45,5 +45,10 @@ public interface IMaterialINService extends IService<MaterialIN> {
*/
String
updateMaterialIN
(
MaterialIN
materialIN
);
/***
* 根据id查询入库单
* @param id
* @return
*/
MaterialIN
queryById
(
String
id
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialINServiceImpl.java
查看文件 @
131938a
...
...
@@ -173,6 +173,14 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
this
.
baseMapper
.
updateById
(
materialIN
);
return
null
;
}
/***
* 根据id查询入库单
* @param id
* @return
*/
public
MaterialIN
queryById
(
String
id
){
return
this
.
baseMapper
.
queryById
(
id
);
}
/***
* 出库
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论