Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
e89392f5
由
康伟
编写于
2024-10-11 12:25:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
kangwei : 补充 入库验收单审核列表接口
导出pdf文件接口
1 个父辈
20102728
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
152 行增加
和
55 行删除
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.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/DistributMaterial.java
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/DistributMaterialMapper.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/DistributMaterialMapper.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/mapper/xml/PurchaseMaterialMapper.xml
sk-module-biz/src/main/java/com/skua/modules/erp/service/IDistributContractService.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/IERPPurchaseContractService.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/PurchaseMaterialServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/erp/controller/DistributContractController.java
查看文件 @
e89392f
...
...
@@ -15,6 +15,7 @@ import com.skua.core.query.QueryGenerator;
import
com.skua.core.service.ISequenceService
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.erp.entity.DistributContract
;
import
com.skua.modules.erp.entity.DistributMaterial
;
import
com.skua.modules.erp.entity.PurchaseMaterial
;
import
com.skua.modules.erp.service.IDistributContractService
;
import
java.util.Date
;
...
...
@@ -25,6 +26,7 @@ import com.skua.modules.erp.service.IPurchaseMaterialService;
import
com.skua.modules.erp.vo.DistributContractVO
;
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
;
...
...
@@ -93,8 +95,18 @@ public class DistributContractController {
public
Result
<
DistributContractVO
>
add
(
@RequestBody
DistributContractVO
distributContract
)
{
Result
<
DistributContractVO
>
result
=
new
Result
<
DistributContractVO
>();
try
{
distributContractService
.
saveDistributContractVO
(
distributContract
);
String
goodsCode
=
checkSameGoodCode
(
distributContract
.
getMaterialList
());
if
(
StringUtils
.
isNotEmpty
(
goodsCode
))
{
result
.
error500
(
"操作失败,货号["
+
goodsCode
+
"]重复!"
);
}
else
{
String
errMsg
=
distributContractService
.
saveDistributContractVO
(
distributContract
);
if
(
errMsg
!=
null
){
result
.
error500
(
errMsg
);
}
else
{
result
.
success
(
"添加成功!"
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
result
.
error500
(
"操作失败"
);
...
...
@@ -111,15 +123,37 @@ public class DistributContractController {
if
(
distributContractEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
boolean
ok
=
distributContractService
.
updateDistributContractVO
(
distributContract
);
//TODO 返回false说明什么?
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
}
String
goodsCode
=
checkSameGoodCode
(
distributContract
.
getMaterialList
());
if
(
StringUtils
.
isNotEmpty
(
goodsCode
))
{
result
.
error500
(
"操作失败,货号["
+
goodsCode
+
"]重复!"
);
}
else
{
String
errMsg
=
distributContractService
.
updateDistributContractVO
(
distributContract
);
if
(
errMsg
!=
null
){
result
.
error500
(
errMsg
);
}
else
{
result
.
success
(
"修改成功!"
);
}
}
}
return
result
;
}
/***
* 校验是否有重复的货号
* @param materialList
* @return
*/
public
String
checkSameGoodCode
(
List
<
DistributMaterial
>
materialList
){
String
goodCode
=
""
;
for
(
DistributMaterial
material
:
materialList
){
if
(
goodCode
.
contains
(
material
.
getGoodCode
()
)){
goodCode
=
material
.
getGoodCode
();
break
;
}
goodCode
=
goodCode
+
","
+
material
.
getGoodCode
();
}
return
null
;
}
@AutoLog
(
value
=
"erp分销合同-通过id删除"
)
@ApiOperation
(
value
=
"erp分销合同-通过id删除"
,
notes
=
"erp分销合同-通过id删除"
)
...
...
@@ -216,12 +250,15 @@ public class DistributContractController {
@AutoLog
(
value
=
"erp分销合同-根据货号查询采购合同物料清单"
)
@ApiOperation
(
value
=
"erp分销合同-根据货号查询采购合同物料清单"
,
notes
=
"erp分销合同-根据货号查询采购合同物料清单"
)
@GetMapping
(
value
=
"/queryMaterialByGoodCode"
)
public
Result
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
@RequestParam
(
name
=
"goodCode"
)
String
goodCode
)
{
public
Result
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
@RequestParam
(
name
=
"goodCode"
)
String
goodCode
,
@RequestParam
(
name
=
"departId"
)
String
departId
)
{
Result
<
PurchaseMaterial
>
result
=
new
Result
<
PurchaseMaterial
>();
List
<
PurchaseMaterial
>
purchaseMaterialList
=
purchaseMaterialService
.
queryMaterialByGoodCode
(
goodCode
,
BaseContextHandler
.
getRealDepartId
()
);
result
.
setSuccess
(
true
);
List
<
PurchaseMaterial
>
purchaseMaterialList
=
purchaseMaterialService
.
queryMaterialByGoodCode
(
goodCode
,
departId
);
if
(
purchaseMaterialList
!=
null
&&
!
purchaseMaterialList
.
isEmpty
()){
result
.
setSuccess
(
true
);
result
.
setResult
(
purchaseMaterialList
.
get
(
0
));
}
else
{
result
.
error500
(
"根据[厂站]以及[货号]未找到采购合同!"
);
}
return
result
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/controller/MaterialINController.java
查看文件 @
e89392f
...
...
@@ -166,9 +166,9 @@ public class MaterialINController {
@AutoLog
(
value
=
"erp--物料(药剂)入库--药剂到货日验收记录"
)
@ApiOperation
(
value
=
"erp--物料(药剂)入库-药剂到货日验收记录"
,
notes
=
"erp--物料(药剂)入库-药剂到货日验收记录"
)
@GetMapping
(
value
=
"/arrivalRecordList"
)
public
Result
<
List
<
MaterialIN
>>
arrivalRecordList
(
MaterialIN
materialIN
)
{
Result
<
List
<
MaterialIN
>>
result
=
new
Result
<
List
<
MaterialIN
>>();
QueryWrapper
<
MaterialIN
>
queryWrapper
=
new
QueryWrapper
();
//QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
public
Result
<
List
<
ArrivalRecordExcelExportVO
>>
arrivalRecordList
(
MaterialIN
materialIN
)
{
Result
<
List
<
ArrivalRecordExcelExportVO
>>
result
=
new
Result
<
List
<
ArrivalRecordExcelExportVO
>>();
/*
QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();//QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
if(StringUtils.isNotBlank(materialIN.getGoodCode())){
queryWrapper.like("good_code",materialIN.getGoodCode());
}
...
...
@@ -188,7 +188,9 @@ public class MaterialINController {
queryWrapper.eq("purchase_contract_id",materialIN.getPurchaseContractId());
}
queryWrapper.eq("audit_status","3");
List
<
MaterialIN
>
pageList
=
materialINService
.
list
(
queryWrapper
);
List<MaterialIN> pageList = materialINService.list( queryWrapper);*/
List
<
ArrivalRecordExcelExportVO
>
pageList
=
materialINService
.
queryArrivalRecordByList
(
materialIN
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
@@ -401,7 +403,7 @@ public class MaterialINController {
@AutoLog
(
value
=
"erp--药剂到货验收记录表"
)
@ApiOperation
(
value
=
"erp--药剂到货验收记录表"
,
notes
=
"erp--药剂到货验收记录表"
)
@
Reques
tMapping
(
value
=
"/exportArrivalRecordExcel"
)
@
Ge
tMapping
(
value
=
"/exportArrivalRecordExcel"
)
public
ModelAndView
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
MaterialIN
materialIN
=
null
;
// Step.1 组装查询条件
...
...
@@ -429,7 +431,7 @@ public class MaterialINController {
}
@AutoLog
(
value
=
"erp--导出物资验收pdf文件"
)
@ApiOperation
(
value
=
"erp--导出物资验收pdf文件"
,
notes
=
"erp--导出物资验收pdf文件"
)
@
Reques
tMapping
(
value
=
"/exportArrivalRecordPDF"
)
@
Ge
tMapping
(
value
=
"/exportArrivalRecordPDF"
)
public
void
exportPDF
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
// Step.1 组装查询条件
//QueryWrapper<MaterialIN> queryWrapper = null;
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/entity/DistributMaterial.java
查看文件 @
e89392f
...
...
@@ -28,6 +28,10 @@ public class DistributMaterial {
@TableId
(
type
=
IdType
.
UUID
)
@ApiModelProperty
(
value
=
"主键"
)
private
String
id
;
/**部门编号冗余*/
private
String
departId
;
/**分销合同编号*/
@Excel
(
name
=
"分销合同编号"
,
width
=
15
)
@ApiModelProperty
(
value
=
"分销合同编号"
)
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/DistributMaterialMapper.java
查看文件 @
e89392f
...
...
@@ -22,4 +22,12 @@ public interface DistributMaterialMapper extends BaseMapper<DistributMaterial> {
* @return
*/
public
int
checkGoodCode
(
@Param
(
"id"
)
String
id
,
@Param
(
"goodCode"
)
String
goodCode
);
/***
* 根据departId或code校验货号是否唯一
* @param goodsCode
* @param departId
* @return
*/
int
checkGoodCodeAndDepartId
(
@Param
(
"goodCode"
)
String
goodsCode
,
@Param
(
"departId"
)
String
departId
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/PurchaseMaterialMapper.java
查看文件 @
e89392f
...
...
@@ -47,7 +47,7 @@ public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> {
* @param departId
* @return
*/
List
<
PurchaseMaterial
>
query
ByList
(
@Param
(
"goodCode"
)
String
goodCode
,
@Param
(
"departId"
)
String
departId
);
List
<
PurchaseMaterial
>
query
MaterialByGoodCode
(
@Param
(
"goodCode"
)
String
goodCode
,
@Param
(
"departId"
)
String
departId
);
/***
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/DistributMaterialMapper.xml
查看文件 @
e89392f
...
...
@@ -21,4 +21,10 @@
where good_code = #{goodCode}
<if
test=
"id != null and id !=''"
>
and id = #{id}
</if>
</select>
<!-- 校验货号是否唯一 -->
<select
id=
"checkGoodCodeAndDepartId"
resultType=
"java.lang.Integer"
>
select count(1) from erp_distribut_material
where good_code = #{goodCode} and depart_id = #{departId}
</select>
</mapper>
\ No newline at end of file
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/MaterialINMapper.xml
查看文件 @
e89392f
...
...
@@ -13,21 +13,21 @@
<where>
mi.audit_status =3
<if
test=
"startTime != null and startTime !=''"
>
and mi.arrive_time
>
= #{
param.
startTime}
and mi.arrive_time
>
= #{startTime}
</if>
<if
test=
"endTime != null
param.
endTime !=''"
>
and mi.arrive_time
<
= #{
param.
endTime}
<if
test=
"endTime != null
and
endTime !=''"
>
and mi.arrive_time
<
= #{endTime}
</if>
<if
test=
"goodCode != null goodCode !=''"
>
<if
test=
"goodCode != null
and
goodCode !=''"
>
and mi.good_code like CONCAT('',#{goodCode},'%')
</if>
<if
test=
"sparepartName != null sparepartName !=''"
>
<if
test=
"sparepartName != null
and
sparepartName !=''"
>
and mi.sparepart_name like CONCAT('%',#{sparepartName},'%')
</if>
<if
test=
"departId != null departId !=''"
>
<if
test=
"departId != null
and
departId !=''"
>
and mi.depart_id = #{departId}
</if>
<if
test=
"supplierId != null supplierId !=''"
>
<if
test=
"supplierId != null
and
supplierId !=''"
>
and mi.supplier_id = #{supplierId}
</if>
</where>
...
...
@@ -35,31 +35,31 @@
</select>
<!--获取入库审批列表:根据部门、采购合同、供应商、药剂分组搜索 -->
<select
id=
"
queryArrivalRecordByList
"
resultType=
"com.skua.modules.erp.vo.ArrivalRecordExcelExportVO"
>
<select
id=
"
selectAuditMaterialINByPage
"
resultType=
"com.skua.modules.erp.vo.ArrivalRecordExcelExportVO"
>
select sparepart_id , purchase_contract_id,depart_id ,supplier_id,
sum(purchase_num) 'purchase_num',measuring_unit,specification,sparepart_name,tax_amount,
purchase_price,distribut_price,sum(purchase_total_price) 'purchase_total_price',sum(distribut_total_price) 'distribut_total_price',sum(total_price_tax) 'total_price_tax'
from erp_material_in
<where>
mi.audit_status =3
<if
test=
"
startTime != null and
startTime !=''"
>
and arrive_time
>
= #{
param
.startTime}
<if
test=
"
materialIN.startTime != null and materialIN.
startTime !=''"
>
and arrive_time
>
= #{
materialIN
.startTime}
</if>
<if
test=
"
endTime != null param
.endTime !=''"
>
and arrive_time
<
= #{
param
.endTime}
<if
test=
"
materialIN.endTime != null and materialIN
.endTime !=''"
>
and arrive_time
<
= #{
materialIN
.endTime}
</if>
<if
test=
"
departId != null
departId !=''"
>
and depart_id = #{departId}
<if
test=
"
materialIN.departId != null and materialIN.
departId !=''"
>
and depart_id = #{
materialIN.
departId}
</if>
<if
test=
"
supplierId != null
supplierId !=''"
>
and supplier_id = #{supplierId}
<if
test=
"
materialIN.supplierId != null and materialIN.
supplierId !=''"
>
and supplier_id = #{
materialIN.
supplierId}
</if>
<if
test=
"
purchaseContractId != null
purchaseContractId !=''"
>
and purchase_contract_id = #{purchaseContractId}
<if
test=
"
materialIN.purchaseContractId != null and materialIN.
purchaseContractId !=''"
>
and purchase_contract_id = #{
materialIN.
purchaseContractId}
</if>
</where>
group by sparepart_id
,
purchase_contract_id,depart_id,supplier_id
group by sparepart_id
,
purchase_contract_id,depart_id,supplier_id
</select>
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/mapper/xml/PurchaseMaterialMapper.xml
查看文件 @
e89392f
...
...
@@ -35,16 +35,12 @@
left join ajh_supplier_manage sm on sm.id = aaa.supplier_id
</select>
<select
id=
"query
ByList
"
resultType=
"com.skua.modules.erp.entity.PurchaseMaterial"
>
<select
id=
"query
MaterialByGoodCode
"
resultType=
"com.skua.modules.erp.entity.PurchaseMaterial"
>
select ss.sparepart_code,ss.sparepart_name, st.item_text as 'sparepart_type_name',sm.supp_name as 'supplier_name', aaa.*
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}, '%')
</if>
<if
test=
"departId != null and departId != ''"
>
AND pc.departs like concat('%', #{departId}, '%')
</if>
AND m.good_code = #{goodCode}
AND pc.departs like CONCAT('%', #{departId}, '%')
limit 1
) aaa
left join equipment_sparepart_supplies ss on aaa.sparepart_id = ss.id
...
...
@@ -66,7 +62,7 @@
<select
id=
"queryPurchaseMaterialListByIn"
resultType=
"com.skua.modules.erp.vo.PurchaseMaterialVO"
>
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.*
select pm.*
,pc.depart_id
from erp_purchase_material pm , erp_purchase_contract pc
where pm.contract_id =pc.id
<if
test=
"param.sparepartCode != null and param.sparepartCode !=''"
>
and pc.departs like concat('%', #{param.departId}, '%')
</if>
...
...
@@ -74,7 +70,7 @@
<if
test=
"param.sparepartType != null and param.sparepartType !=''"
>
and pm.sparepart_type in (${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 erp_distribut_material dm on
(aaa.good_code = dm.good_code and aaa.depart_id)
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
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/IDistributContractService.java
查看文件 @
e89392f
...
...
@@ -20,14 +20,14 @@ public interface IDistributContractService extends IService<DistributContract> {
* 新增DistributContractVO
* @param distributContractVO
*/
public
void
saveDistributContractVO
(
DistributContractVO
distributContractVO
);
public
String
saveDistributContractVO
(
DistributContractVO
distributContractVO
);
/**
* 修改DistributContractVOVO
* @param distributContractVO
* @return
*/
public
boolean
updateDistributContractVO
(
DistributContractVO
distributContractVO
);
public
String
updateDistributContractVO
(
DistributContractVO
distributContractVO
);
/***
* 删除DistributContractVOVO
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/IERPPurchaseContractService.java
查看文件 @
e89392f
...
...
@@ -69,8 +69,4 @@ public interface IERPPurchaseContractService extends IService<ERPPurchaseContrac
* @return
*/
int
syncEquipmentIn
(
PurchaseContractVO
purchaseContractVO
)
throws
Exception
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/DistributContractServiceImpl.java
查看文件 @
e89392f
...
...
@@ -12,7 +12,9 @@ import com.skua.modules.erp.mapper.PurchaseMaterialMapper;
import
com.skua.modules.erp.service.IDistributContractService
;
import
com.skua.modules.erp.vo.DistributContractVO
;
import
com.skua.modules.erp.vo.PurchasePlanVO
;
import
com.skua.modules.system.mapper.SysDepartMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -31,22 +33,40 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
@Resource
private
ApproveRecordMapper
recordMapper
;
//申请记录
@Autowired
private
SysDepartMapper
departMapper
;
/***
* 新增DistributContract
* @param distributContractVO
*/
public
void
saveDistributContractVO
(
DistributContractVO
distributContractVO
){
@Transactional
public
String
saveDistributContractVO
(
DistributContractVO
distributContractVO
){
String
errMsg
=
null
;
if
(
distributContractVO
.
getMaterialList
()
!=
null
&&
!
distributContractVO
.
getMaterialList
().
isEmpty
()){
for
(
DistributMaterial
material
:
distributContractVO
.
getMaterialList
()){
//根据deptid与goodscode校验
int
count
=
checkGoodCodeAndDepartId
(
material
.
getGoodCode
(),
distributContractVO
.
getDepartId
()
);
if
(
count
>
0
){
errMsg
=
"所属厂站["
+
departMapper
.
selectById
(
distributContractVO
.
getDepartId
()).
getDepartName
()+
"]下的货号["
+
material
.
getGoodCode
()+
"]已经分销过!"
;
break
;
}
}
}
if
(
errMsg
!=
null
){
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
()
);
material
.
setDepartId
(
distributContractVO
.
getDepartId
()
)
;
//冗余所属厂站
materialMapper
.
insert
(
material
);
}
}
}
return
errMsg
;
}
/**
...
...
@@ -54,9 +74,23 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
* @param distributContractVO
* @return
*/
public
boolean
updateDistributContractVO
(
DistributContractVO
distributContractVO
){
public
String
updateDistributContractVO
(
DistributContractVO
distributContractVO
){
String
errMsg
=
null
;
if
(
distributContractVO
.
getMaterialList
()
!=
null
&&
!
distributContractVO
.
getMaterialList
().
isEmpty
()){
for
(
DistributMaterial
material
:
distributContractVO
.
getMaterialList
()){
//根据deptid与goodscode校验
int
count
=
checkGoodCodeAndDepartId
(
material
.
getGoodCode
(),
distributContractVO
.
getDepartId
()
);
if
(
count
>
1
){
errMsg
=
"所属厂站["
+
departMapper
.
selectById
(
distributContractVO
.
getDepartId
()).
getDepartName
()+
"]下的货号["
+
material
.
getGoodCode
()+
"]已经分销过!"
;
break
;
}
}
}
if
(
errMsg
!=
null
){
int
count
=
this
.
baseMapper
.
updateById
(
distributContractVO
);
// ge根据计划编号删除清单集合
materialMapper
.
delByContractId
(
distributContractVO
.
getId
()
)
;
...
...
@@ -64,11 +98,25 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
for
(
DistributMaterial
material
:
distributContractVO
.
getMaterialList
()){
material
.
setId
(
null
);
material
.
setContractId
(
distributContractVO
.
getId
()
);
material
.
setDepartId
(
distributContractVO
.
getDepartId
()
)
;
//冗余所属厂站
materialMapper
.
insert
(
material
);
}
}
return
count
>
0
?
true
:
false
;
}
return
errMsg
;
}
/***
* 根据所属厂长、以及goodcode校验是否存在
* @param goodsCode
* @param departId
* @return
*/
public
int
checkGoodCodeAndDepartId
(
String
goodsCode
,
String
departId
){
return
materialMapper
.
checkGoodCodeAndDepartId
(
goodsCode
,
departId
);
}
/***
* 删除DistributContractVOVO
...
...
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/PurchaseMaterialServiceImpl.java
查看文件 @
e89392f
...
...
@@ -36,7 +36,7 @@ public class PurchaseMaterialServiceImpl extends ServiceImpl<PurchaseMaterialMap
* @return
*/
public
List
<
PurchaseMaterial
>
queryMaterialByGoodCode
(
String
goodCode
,
String
departId
){
return
this
.
baseMapper
.
query
ByList
(
goodCode
,
departId
);
return
this
.
baseMapper
.
query
MaterialByGoodCode
(
goodCode
,
departId
);
}
/**
* 药剂入库查询结果:采购物料清单+分销单价+分销总价
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论