Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tianjin-cement
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
竹天卫
tianjin-cement
Commits
cceb39b8
Commit
cceb39b8
authored
Mar 06, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复完成
parent
84036b1a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
327 additions
and
189 deletions
+327
-189
pom.xml
cement-business/pom.xml
+2
-2
SupplierController.java
...ise/sc/cement/business/controller/SupplierController.java
+1
-2
Consumables.java
...n/java/cn/wise/sc/cement/business/entity/Consumables.java
+1
-1
ConsumablesEnter.java
...a/cn/wise/sc/cement/business/entity/ConsumablesEnter.java
+1
-1
StandardEnter.java
...java/cn/wise/sc/cement/business/entity/StandardEnter.java
+1
-1
SampleDistributionMapper.java
...e/sc/cement/business/mapper/SampleDistributionMapper.java
+3
-0
PlanConsumablesPurchaseMapper.xml
...ent/business/mapper/xml/PlanConsumablesPurchaseMapper.xml
+9
-1
PlanEquipmentMaintainMapper.xml
...ement/business/mapper/xml/PlanEquipmentMaintainMapper.xml
+9
-1
PlanEquipmentPurchaseMapper.xml
...ement/business/mapper/xml/PlanEquipmentPurchaseMapper.xml
+10
-1
PlanEquipmentRepairMapper.xml
.../cement/business/mapper/xml/PlanEquipmentRepairMapper.xml
+9
-1
PlanStandardPurchaseMapper.xml
...cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
+8
-1
SampleDistributionMapper.xml
...c/cement/business/mapper/xml/SampleDistributionMapper.xml
+30
-0
SampleMapper.xml
...va/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
+10
-10
ChangeStockQuery.java
...wise/sc/cement/business/model/query/ChangeStockQuery.java
+1
-1
StandardQuery.java
...cn/wise/sc/cement/business/model/query/StandardQuery.java
+3
-3
PlanConsumablesPurchaseVo.java
...c/cement/business/model/vo/PlanConsumablesPurchaseVo.java
+3
-3
PlanEquipmentMaintainVo.java
.../sc/cement/business/model/vo/PlanEquipmentMaintainVo.java
+1
-1
PlanEquipmentPurchaseVo.java
.../sc/cement/business/model/vo/PlanEquipmentPurchaseVo.java
+2
-2
PlanEquipmentRepairVo.java
...se/sc/cement/business/model/vo/PlanEquipmentRepairVo.java
+2
-2
PlanStandardPurchaseVo.java
...e/sc/cement/business/model/vo/PlanStandardPurchaseVo.java
+1
-1
StandardVo.java
.../java/cn/wise/sc/cement/business/model/vo/StandardVo.java
+6
-0
ISupplierService.java
.../cn/wise/sc/cement/business/service/ISupplierService.java
+2
-0
ConsumablesServiceImpl.java
.../cement/business/service/impl/ConsumablesServiceImpl.java
+2
-2
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+140
-77
PlanConsumablesPurchaseServiceImpl.java
...ness/service/impl/PlanConsumablesPurchaseServiceImpl.java
+0
-8
PlanEquipmentPurchaseServiceImpl.java
...siness/service/impl/PlanEquipmentPurchaseServiceImpl.java
+0
-18
PlanEquipmentRepairServiceImpl.java
...business/service/impl/PlanEquipmentRepairServiceImpl.java
+0
-10
PlanStandardPurchaseServiceImpl.java
...usiness/service/impl/PlanStandardPurchaseServiceImpl.java
+0
-10
StandardServiceImpl.java
.../sc/cement/business/service/impl/StandardServiceImpl.java
+42
-24
SupplierServiceImpl.java
.../sc/cement/business/service/impl/SupplierServiceImpl.java
+28
-5
No files found.
cement-business/pom.xml
View file @
cceb39b8
...
@@ -230,8 +230,8 @@
...
@@ -230,8 +230,8 @@
<directory>
src/main/resources
</directory>
<directory>
src/main/resources
</directory>
<filtering>
true
</filtering>
<filtering>
true
</filtering>
<includes>
<includes>
<!--<include>*.xlsx</include>
-->
<!--<include>*.xlsx</include>
<include>
*
</include>
<include>*</include>
-->
</includes>
</includes>
</resource>
</resource>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SupplierController.java
View file @
cceb39b8
...
@@ -105,8 +105,7 @@ public class SupplierController {
...
@@ -105,8 +105,7 @@ public class SupplierController {
@PostMapping
(
"/delete/{id}"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
)
{
public
BaseResponse
delete
(
@PathVariable
Integer
id
)
{
try
{
try
{
supplierService
.
removeById
(
id
);
return
supplierService
.
deleteSupplier
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"删除供应商{}"
,
e
);
log
.
debug
(
"删除供应商{}"
,
e
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Consumables.java
View file @
cceb39b8
...
@@ -61,7 +61,7 @@ public class Consumables implements Serializable {
...
@@ -61,7 +61,7 @@ public class Consumables implements Serializable {
@ApiModelProperty
(
"入库数量 (单位:瓶)"
)
@ApiModelProperty
(
"入库数量 (单位:瓶)"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Integer
enterNum
;
private
BigDecimal
enterNum
;
@ApiModelProperty
(
"多少g/瓶"
)
@ApiModelProperty
(
"多少g/瓶"
)
private
BigDecimal
unitStock
;
private
BigDecimal
unitStock
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/ConsumablesEnter.java
View file @
cceb39b8
...
@@ -41,7 +41,7 @@ public class ConsumablesEnter implements Serializable {
...
@@ -41,7 +41,7 @@ public class ConsumablesEnter implements Serializable {
private
Integer
userId
;
private
Integer
userId
;
@ApiModelProperty
(
"新增数量 瓶"
)
@ApiModelProperty
(
"新增数量 瓶"
)
private
Integer
enterNum
;
private
BigDecimal
enterNum
;
@ApiModelProperty
(
"创建时间"
)
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/StandardEnter.java
View file @
cceb39b8
...
@@ -42,7 +42,7 @@ public class StandardEnter implements Serializable {
...
@@ -42,7 +42,7 @@ public class StandardEnter implements Serializable {
private
Integer
userId
;
private
Integer
userId
;
@ApiModelProperty
(
"新增数量(单位: 瓶)"
)
@ApiModelProperty
(
"新增数量(单位: 瓶)"
)
private
Integer
enterNum
;
private
BigDecimal
enterNum
;
@ApiModelProperty
(
"创建时间"
)
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleDistributionMapper.java
View file @
cceb39b8
...
@@ -28,6 +28,9 @@ public interface SampleDistributionMapper extends BaseMapper<SampleDistribution>
...
@@ -28,6 +28,9 @@ public interface SampleDistributionMapper extends BaseMapper<SampleDistribution>
List
<
SampleDistributionTeamVo
>
getDistributionTeamList
(
@Param
(
"sampleId"
)
Integer
sampleId
,
List
<
SampleDistributionTeamVo
>
getDistributionTeamList
(
@Param
(
"sampleId"
)
Integer
sampleId
,
@Param
(
"userId"
)
Integer
userId
);
@Param
(
"userId"
)
Integer
userId
);
List
<
SampleDistributionTeamVo
>
getDistributionTeamResultList
(
@Param
(
"sampleId"
)
Integer
sampleId
,
@Param
(
"userId"
)
Integer
userId
);
List
<
SampleTeamGroupUserVo
>
getDistributionTeamGroupList
(
@Param
(
"sampleId"
)
Integer
sampleId
,
List
<
SampleTeamGroupUserVo
>
getDistributionTeamGroupList
(
@Param
(
"sampleId"
)
Integer
sampleId
,
@Param
(
"userId"
)
Integer
userId
);
@Param
(
"userId"
)
Integer
userId
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanConsumablesPurchaseMapper.xml
View file @
cceb39b8
...
@@ -68,7 +68,15 @@
...
@@ -68,7 +68,15 @@
</sql>
</sql>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo"
>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo"
>
SELECT t.*, su.name as purchaserName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.technical_index),'',t.technical_index) as technicalIndex,
IF(ISNULL(t.production_unit),'',t.production_unit) as productionUnit,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as purchaseNum,
IF(ISNULL(t.unit_price),'',t.unit_price) as unitPrice,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as purchaseDate,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_consumables_purchase t
FROM plan_consumables_purchase t
left join sys_user su on su.id = t.purchaser_id
left join sys_user su on su.id = t.purchaser_id
<include
refid=
"whereNew"
/>
<include
refid=
"whereNew"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentMaintainMapper.xml
View file @
cceb39b8
...
@@ -62,7 +62,15 @@
...
@@ -62,7 +62,15 @@
</sql>
</sql>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo"
>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo"
>
SELECT t.*, su.name as maintainerName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.code),'',t.code) as code,
IF(ISNULL(t.maintain_date),'',t.maintain_date) as maintainDate,
IF(ISNULL(t.maintain_content),'',t.maintain_content) as maintainContent,
IF(ISNULL(su.name),'',su.name) as maintainerName,
IF(ISNULL(t.maintain_result),'',t.maintain_result) as maintainResult,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_equipment_maintain t
FROM plan_equipment_maintain t
left join sys_user su on su.id = t.maintainer_id
left join sys_user su on su.id = t.maintainer_id
<include
refid=
"whereNew"
/>
<include
refid=
"whereNew"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentPurchaseMapper.xml
View file @
cceb39b8
...
@@ -68,7 +68,16 @@
...
@@ -68,7 +68,16 @@
</sql>
</sql>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo"
>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo"
>
SELECT t.*, su.name as purchaserName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.technical_index),'',t.technical_index) as technicalIndex,
IF(ISNULL(t.unit_price),'',t.unit_price) as unitPrice,
IF(ISNULL(t.production_unit),'',t.production_unit) as productionUnit,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as purchaseNum,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as purchaseDateStr,
IF(ISNULL(su.name),'',su.name) as purchaserName,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_equipment_purchase t
FROM plan_equipment_purchase t
left join sys_user su on su.id = t.purchaser_id
left join sys_user su on su.id = t.purchaser_id
<include
refid=
"whereNew"
/>
<include
refid=
"whereNew"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanEquipmentRepairMapper.xml
View file @
cceb39b8
...
@@ -55,7 +55,15 @@
...
@@ -55,7 +55,15 @@
</sql>
</sql>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo"
>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo"
>
SELECT t.*, su.name as repairerName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.technical_index),'',t.technical_index) as technicalIndex,
IF(ISNULL(t.unit_price),'',t.unit_price) as unitPrice,
IF(ISNULL(t.production_unit),'',t.production_unit) as productionUnit,
IF(ISNULL(t.repair_date),'',t.repair_date) as repairDate,
IF(ISNULL(su.name),'',su.name) as repairerName,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_equipment_repair t
FROM plan_equipment_repair t
left join sys_user su on su.id = t.repairer_id
left join sys_user su on su.id = t.repairer_id
<include
refid=
"whereNew"
/>
<include
refid=
"whereNew"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/PlanStandardPurchaseMapper.xml
View file @
cceb39b8
...
@@ -65,7 +65,14 @@
...
@@ -65,7 +65,14 @@
</where>
</where>
</sql>
</sql>
<select
id=
"wordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo"
>
<select
id=
"wordList"
resultType=
"cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo"
>
SELECT t.*, su.name as purchaserName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.code),'',t.code) as code,
IF(ISNULL(t.distribution_unit),'',t.distribution_unit) as distributionUnit,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as purchaseNum,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as createTimeStr,
IF(ISNULL(su.name),'',su.name) as purchaserName,
IF(ISNULL(t.remark),'',t.remark) as remark
FROM plan_standard_purchase t
FROM plan_standard_purchase t
left join sys_user su on su.id = t.purchaser_id
left join sys_user su on su.id = t.purchaser_id
<include
refid=
"whereNew"
/>
<include
refid=
"whereNew"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleDistributionMapper.xml
View file @
cceb39b8
...
@@ -52,6 +52,32 @@
...
@@ -52,6 +52,32 @@
</select>
</select>
<select
id=
"getDistributionTeamList"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo"
>
<select
id=
"getDistributionTeamList"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo"
>
select t.id as distributionId, su.id as userId, su.name as userName,
t.team_group_id as teamGroupId, tg.name as teamGroupName, s.id as teamId, s.name as teamName,
t.status as status,
(
CASE t.status
WHEN 0 THEN '未接受'
WHEN 1 THEN '接受'
WHEN 2 THEN '待校核'
WHEN 3 THEN '退回'
WHEN 4 THEN '校核通过'
WHEN 5 THEN '校核退回'
ELSE ''
END
) as statusValue
from sample_distribution t
left join sys_user su on su.id = t.user_id
left join team s on s.id = t.team_id
left join team_group tg on tg.id = t.team_group_id
where t.sample_id = #{sampleId} and s.is_pf != 0
<if
test=
"userId != null"
>
and t.user_id = #{userId}
</if>
order by t.id asc
</select>
<select
id=
"getDistributionTeamResultList"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo"
>
select t.id as distributionId, su.id as userId, su.name as userName,
select t.id as distributionId, su.id as userId, su.name as userName,
t.team_group_id as teamGroupId, tg.name as teamGroupName, s.id as teamId, s.name as teamName,
t.team_group_id as teamGroupId, tg.name as teamGroupName, s.id as teamId, s.name as teamName,
t.status as status,
t.status as status,
...
@@ -77,6 +103,10 @@
...
@@ -77,6 +103,10 @@
order by t.id asc
order by t.id asc
</select>
</select>
<select
id=
"getDistributionTeamGroupList"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleTeamGroupUserVo"
>
<select
id=
"getDistributionTeamGroupList"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleTeamGroupUserVo"
>
select su.id as userId,
select su.id as userId,
t.team_group_id as teamGroupId
t.team_group_id as teamGroupId
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
View file @
cceb39b8
...
@@ -96,16 +96,16 @@
...
@@ -96,16 +96,16 @@
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.SampleWord"
>
<select
id=
"exportWordList"
resultType=
"cn.wise.sc.cement.business.model.SampleWord"
>
SELECT
SELECT
e.project_name AS project_n
ame,
IF(ISNULL(e.project_name),'',e.project_name) AS projectN
ame,
e.entrust_c
ode,
IF(ISNULL(e.entrust_code),'',e.entrust_code) AS entrustC
ode,
s.
name,
IF(ISNULL(s.name),'',s.name) AS
name,
s.cement_c
ode,
IF(ISNULL(s.cement_code),'',s.cement_code) AS cementC
ode,
s.
weight,
IF(ISNULL(s.weight),'',s.weight) AS
weight,
s.original_p
osition,
IF(ISNULL(s.original_position),'',s.original_position) AS originalP
osition,
date_format(s.create_time, '%Y/%m/%d') as create_t
ime,
IF(ISNULL(s.create_time),'',date_format(s.create_time, '%Y/%m/%d')) AS createT
ime,
s.
remark,
IF(ISNULL(s.remark),'',s.remark) AS
remark,
date_format(s.destruction_time, '%Y/%m/%d') as destruction_t
ime,
IF(ISNULL(s.destruction_time),'',date_format(s.destruction_time, '%Y/%m/%d')) AS destructionT
ime,
su.name AS user_n
ame
IF(ISNULL(su.name),'',su.name) AS userN
ame
FROM
FROM
sample s
sample s
LEFT JOIN entrust e ON s.entrust_id = e.id
LEFT JOIN entrust e ON s.entrust_id = e.id
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/ChangeStockQuery.java
View file @
cceb39b8
...
@@ -25,7 +25,7 @@ public class ChangeStockQuery {
...
@@ -25,7 +25,7 @@ public class ChangeStockQuery {
* 新增数量 / 领用数量
* 新增数量 / 领用数量
*/
*/
@ApiModelProperty
(
"入库数量(单位 瓶)"
)
@ApiModelProperty
(
"入库数量(单位 瓶)"
)
private
Integer
enterNum
;
private
BigDecimal
enterNum
;
@ApiModelProperty
(
"领用数量(单位 g)"
)
@ApiModelProperty
(
"领用数量(单位 g)"
)
private
BigDecimal
outNum
;
private
BigDecimal
outNum
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/StandardQuery.java
View file @
cceb39b8
...
@@ -45,14 +45,14 @@ public class StandardQuery {
...
@@ -45,14 +45,14 @@ public class StandardQuery {
@ApiModelProperty
(
"存储位置"
)
@ApiModelProperty
(
"存储位置"
)
private
String
position
;
private
String
position
;
@ApiModelProperty
(
"入库数量 (单位:瓶)"
)
/*
@ApiModelProperty("入库数量 (单位:瓶)")
private
Integer
enterNum
;
private Integer enterNum;
*/
@ApiModelProperty
(
"多少g/瓶"
)
@ApiModelProperty
(
"多少g/瓶"
)
private
BigDecimal
unitStock
;
private
BigDecimal
unitStock
;
@ApiModelProperty
(
"库存提醒数量(少于多少进行提醒)"
)
@ApiModelProperty
(
"库存提醒数量(少于多少进行提醒)"
)
private
Integer
leastNum
;
private
BigDecimal
leastNum
;
@ApiModelProperty
(
"备注"
)
@ApiModelProperty
(
"备注"
)
private
String
remark
;
private
String
remark
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanConsumablesPurchaseVo.java
View file @
cceb39b8
...
@@ -31,16 +31,16 @@ public class PlanConsumablesPurchaseVo {
...
@@ -31,16 +31,16 @@ public class PlanConsumablesPurchaseVo {
private
String
technicalIndex
;
private
String
technicalIndex
;
@ApiModelProperty
(
"单价(万元)"
)
@ApiModelProperty
(
"单价(万元)"
)
private
BigDecimal
unitPrice
;
private
String
unitPrice
;
@ApiModelProperty
(
"生产单位"
)
@ApiModelProperty
(
"生产单位"
)
private
String
productionUnit
;
private
String
productionUnit
;
@ApiModelProperty
(
"采购数量"
)
@ApiModelProperty
(
"采购数量"
)
private
Integer
purchaseNum
;
private
String
purchaseNum
;
@ApiModelProperty
(
"采购日期(购买日期)"
)
@ApiModelProperty
(
"采购日期(购买日期)"
)
private
LocalDate
purchaseDate
;
private
String
purchaseDate
;
@ApiModelProperty
(
"采购人id"
)
@ApiModelProperty
(
"采购人id"
)
private
Integer
purchaserId
;
private
Integer
purchaserId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanEquipmentMaintainVo.java
View file @
cceb39b8
...
@@ -31,7 +31,7 @@ public class PlanEquipmentMaintainVo {
...
@@ -31,7 +31,7 @@ public class PlanEquipmentMaintainVo {
private
String
code
;
private
String
code
;
@ApiModelProperty
(
"维护日期"
)
@ApiModelProperty
(
"维护日期"
)
private
LocalDate
maintainDate
;
private
String
maintainDate
;
@ApiModelProperty
(
"创建人id"
)
@ApiModelProperty
(
"创建人id"
)
private
Integer
userId
;
private
Integer
userId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanEquipmentPurchaseVo.java
View file @
cceb39b8
...
@@ -31,7 +31,7 @@ public class PlanEquipmentPurchaseVo {
...
@@ -31,7 +31,7 @@ public class PlanEquipmentPurchaseVo {
private
String
technicalIndex
;
private
String
technicalIndex
;
@ApiModelProperty
(
"单价(万元)"
)
@ApiModelProperty
(
"单价(万元)"
)
private
BigDecimal
unitPrice
;
private
String
unitPrice
;
@ApiModelProperty
(
"生产单位"
)
@ApiModelProperty
(
"生产单位"
)
private
String
productionUnit
;
private
String
productionUnit
;
...
@@ -40,7 +40,7 @@ public class PlanEquipmentPurchaseVo {
...
@@ -40,7 +40,7 @@ public class PlanEquipmentPurchaseVo {
private
Integer
purchaseNum
;
private
Integer
purchaseNum
;
@ApiModelProperty
(
"采购日期(购买日期)"
)
@ApiModelProperty
(
"采购日期(购买日期)"
)
private
LocalDate
purchaseDate
;
private
String
purchaseDate
;
@ApiModelProperty
(
"采购人id"
)
@ApiModelProperty
(
"采购人id"
)
private
Integer
purchaserId
;
private
Integer
purchaserId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanEquipmentRepairVo.java
View file @
cceb39b8
...
@@ -31,13 +31,13 @@ public class PlanEquipmentRepairVo {
...
@@ -31,13 +31,13 @@ public class PlanEquipmentRepairVo {
private
String
technicalIndex
;
private
String
technicalIndex
;
@ApiModelProperty
(
"单价(万元)"
)
@ApiModelProperty
(
"单价(万元)"
)
private
BigDecimal
unitPrice
;
private
String
unitPrice
;
@ApiModelProperty
(
"生产单位"
)
@ApiModelProperty
(
"生产单位"
)
private
String
productionUnit
;
private
String
productionUnit
;
@ApiModelProperty
(
"维修日期"
)
@ApiModelProperty
(
"维修日期"
)
private
LocalDate
repairDate
;
private
String
repairDate
;
@ApiModelProperty
(
"创建人id"
)
@ApiModelProperty
(
"创建人id"
)
private
Integer
userId
;
private
Integer
userId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/PlanStandardPurchaseVo.java
View file @
cceb39b8
...
@@ -34,7 +34,7 @@ public class PlanStandardPurchaseVo {
...
@@ -34,7 +34,7 @@ public class PlanStandardPurchaseVo {
private
Integer
purchaseNum
;
private
Integer
purchaseNum
;
@ApiModelProperty
(
"采购日期(购买日期)"
)
@ApiModelProperty
(
"采购日期(购买日期)"
)
private
LocalDate
purchaseDate
;
private
String
purchaseDate
;
@ApiModelProperty
(
"采购人id"
)
@ApiModelProperty
(
"采购人id"
)
private
Integer
purchaserId
;
private
Integer
purchaserId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/StandardVo.java
View file @
cceb39b8
...
@@ -54,6 +54,9 @@ public class StandardVo {
...
@@ -54,6 +54,9 @@ public class StandardVo {
@ApiModelProperty
(
"库存数量"
)
@ApiModelProperty
(
"库存数量"
)
private
BigDecimal
stockNum
;
private
BigDecimal
stockNum
;
@ApiModelProperty
(
"多少g/瓶"
)
private
BigDecimal
unitStock
;
@ApiModelProperty
(
"库存提醒数量(少于多少进行提醒)"
)
@ApiModelProperty
(
"库存提醒数量(少于多少进行提醒)"
)
private
BigDecimal
leastNum
;
private
BigDecimal
leastNum
;
...
@@ -72,4 +75,7 @@ public class StandardVo {
...
@@ -72,4 +75,7 @@ public class StandardVo {
@ApiModelProperty
(
"标准值"
)
@ApiModelProperty
(
"标准值"
)
private
List
<
StandardValue
>
standardValueList
;
private
List
<
StandardValue
>
standardValueList
;
@ApiModelProperty
(
"产地"
)
private
String
origin
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISupplierService.java
View file @
cceb39b8
...
@@ -31,4 +31,6 @@ public interface ISupplierService extends IService<Supplier> {
...
@@ -31,4 +31,6 @@ public interface ISupplierService extends IService<Supplier> {
BaseResponse
<
String
>
deleteEnclosure
(
Integer
id
);
BaseResponse
<
String
>
deleteEnclosure
(
Integer
id
);
BaseResponse
<
String
>
deleteSupplier
(
Integer
id
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/ConsumablesServiceImpl.java
View file @
cceb39b8
...
@@ -144,7 +144,7 @@ public class ConsumablesServiceImpl extends ServiceImpl<ConsumablesMapper, Consu
...
@@ -144,7 +144,7 @@ public class ConsumablesServiceImpl extends ServiceImpl<ConsumablesMapper, Consu
return
BaseResponse
.
errorMsg
(
query
.
getName
()
+
"已存在"
);
return
BaseResponse
.
errorMsg
(
query
.
getName
()
+
"已存在"
);
}
}
if
(
query
.
getEnterNum
()
!=
null
&&
query
.
getUnitStock
()
!=
null
){
if
(
query
.
getEnterNum
()
!=
null
&&
query
.
getUnitStock
()
!=
null
){
BigDecimal
stockNum
=
new
BigDecimal
(
query
.
getEnterNum
()
).
multiply
(
query
.
getUnitStock
());
BigDecimal
stockNum
=
query
.
getEnterNum
(
).
multiply
(
query
.
getUnitStock
());
query
.
setStockNum
(
stockNum
);
query
.
setStockNum
(
stockNum
);
}
else
{
}
else
{
query
.
setStockNum
(
new
BigDecimal
(
0
));
query
.
setStockNum
(
new
BigDecimal
(
0
));
...
@@ -210,7 +210,7 @@ public class ConsumablesServiceImpl extends ServiceImpl<ConsumablesMapper, Consu
...
@@ -210,7 +210,7 @@ public class ConsumablesServiceImpl extends ServiceImpl<ConsumablesMapper, Consu
.
setCreateTime
(
LocalDateTime
.
now
())
.
setCreateTime
(
LocalDateTime
.
now
())
.
setRemark
(
query
.
getRemark
());
.
setRemark
(
query
.
getRemark
());
consumablesEnterMapper
.
insert
(
enter
);
consumablesEnterMapper
.
insert
(
enter
);
consumables
.
setStockNum
(
consumables
.
getStockNum
().
add
(
consumables
.
getUnitStock
().
multiply
(
new
BigDecimal
(
enter
.
getEnterNum
()
))));
consumables
.
setStockNum
(
consumables
.
getStockNum
().
add
(
consumables
.
getUnitStock
().
multiply
(
enter
.
getEnterNum
(
))));
consumablesMapper
.
updateById
(
consumables
);
consumablesMapper
.
updateById
(
consumables
);
return
BaseResponse
.
okData
(
"新增入库完成"
);
return
BaseResponse
.
okData
(
"新增入库完成"
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
cceb39b8
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanConsumablesPurchaseServiceImpl.java
View file @
cceb39b8
...
@@ -238,14 +238,6 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
...
@@ -238,14 +238,6 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
if
(
CollectionUtil
.
isEmpty
(
list
))
{
if
(
CollectionUtil
.
isEmpty
(
list
))
{
log
.
debug
(
"没有找到数据!"
);
log
.
debug
(
"没有找到数据!"
);
}
}
list
.
forEach
(
arg
->
{
if
(
StrUtil
.
isEmpty
(
arg
.
getRemark
()))
{
arg
.
setRemark
(
""
);
}
if
(
StrUtil
.
isEmpty
(
arg
.
getImplementation
()))
{
arg
.
setImplementation
(
""
);
}
});
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>();
beanParams
.
put
(
"list"
,
list
);
beanParams
.
put
(
"list"
,
list
);
beanParams
.
put
(
"fileNo"
,
"41-4051-2001"
);
beanParams
.
put
(
"fileNo"
,
"41-4051-2001"
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanEquipmentPurchaseServiceImpl.java
View file @
cceb39b8
...
@@ -4,8 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -4,8 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.PlanEquipmentPurchase
;
import
cn.wise.sc.cement.business.entity.PlanEquipmentPurchase
;
import
cn.wise.sc.cement.business.entity.SysRole
;
import
cn.wise.sc.cement.business.entity.Team
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.mapper.PlanEquipmentPurchaseMapper
;
import
cn.wise.sc.cement.business.mapper.PlanEquipmentPurchaseMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
...
@@ -13,11 +11,7 @@ import cn.wise.sc.cement.business.model.LoginUser;
...
@@ -13,11 +11,7 @@ import cn.wise.sc.cement.business.model.LoginUser;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.PlanEquipmentPurchaseQuery
;
import
cn.wise.sc.cement.business.model.query.PlanEquipmentPurchaseQuery
;
import
cn.wise.sc.cement.business.model.query.PlanFinishQuery
;
import
cn.wise.sc.cement.business.model.query.PlanFinishQuery
;
import
cn.wise.sc.cement.business.model.query.RoleQuery
;
import
cn.wise.sc.cement.business.model.query.TeamQuery
;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo
;
import
cn.wise.sc.cement.business.model.vo.TeamListVo
;
import
cn.wise.sc.cement.business.model.vo.TeamVo
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentPurchaseService
;
import
cn.wise.sc.cement.business.service.IPlanEquipmentPurchaseService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
...
@@ -31,7 +25,6 @@ import org.springframework.beans.BeanUtils;
...
@@ -31,7 +25,6 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
...
@@ -259,17 +252,6 @@ public class PlanEquipmentPurchaseServiceImpl extends ServiceImpl<PlanEquipmentP
...
@@ -259,17 +252,6 @@ public class PlanEquipmentPurchaseServiceImpl extends ServiceImpl<PlanEquipmentP
return
;
return
;
}
}
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
);
list
.
forEach
(
arg
->
{
if
(
StrUtil
.
isEmpty
(
arg
.
getRemark
()))
{
arg
.
setRemark
(
""
);
}
if
(
StrUtil
.
isEmpty
(
arg
.
getImplementation
()))
{
arg
.
setImplementation
(
""
);
}
// arg.setCreateTimeStr(arg.getCreateTime().format(dateTimeFormatter));
arg
.
setPurchaseDateStr
(
arg
.
getPurchaseDate
().
format
(
dateTimeFormatter
));
});
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
5
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
5
);
params
.
put
(
"list"
,
list
);
params
.
put
(
"list"
,
list
);
params
.
put
(
"fileNo"
,
"41-4051-2001"
);
params
.
put
(
"fileNo"
,
"41-4051-2001"
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanEquipmentRepairServiceImpl.java
View file @
cceb39b8
...
@@ -249,16 +249,6 @@ public class PlanEquipmentRepairServiceImpl extends ServiceImpl<PlanEquipmentRep
...
@@ -249,16 +249,6 @@ public class PlanEquipmentRepairServiceImpl extends ServiceImpl<PlanEquipmentRep
return
;
return
;
}
}
// DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
list
.
forEach
(
arg
->
{
if
(
StrUtil
.
isEmpty
(
arg
.
getRemark
()))
{
arg
.
setRemark
(
""
);
}
if
(
StrUtil
.
isEmpty
(
arg
.
getImplementation
()))
{
arg
.
setImplementation
(
""
);
}
// arg.setCreateTimeStr(arg.getCreateTime().format(dateTimeFormatter));
});
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
5
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
5
);
params
.
put
(
"list"
,
list
);
params
.
put
(
"list"
,
list
);
params
.
put
(
"fileNo"
,
"41-4051-2001"
);
params
.
put
(
"fileNo"
,
"41-4051-2001"
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanStandardPurchaseServiceImpl.java
View file @
cceb39b8
...
@@ -239,16 +239,6 @@ public class PlanStandardPurchaseServiceImpl extends ServiceImpl<PlanStandardPur
...
@@ -239,16 +239,6 @@ public class PlanStandardPurchaseServiceImpl extends ServiceImpl<PlanStandardPur
map
.
put
(
"status"
,
status
);
map
.
put
(
"status"
,
status
);
List
<
PlanStandardPurchaseVo
>
planStandardPurchaseVos
=
standardPurchaseMapper
.
wordList
(
map
);
List
<
PlanStandardPurchaseVo
>
planStandardPurchaseVos
=
standardPurchaseMapper
.
wordList
(
map
);
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd"
);
planStandardPurchaseVos
.
forEach
(
arg
->
{
System
.
out
.
println
(
arg
.
getPurchaseDate
().
format
(
dateTimeFormatter
));
arg
.
setCreateTimeStr
(
arg
.
getPurchaseDate
().
format
(
dateTimeFormatter
));
if
(
StrUtil
.
isEmpty
(
arg
.
getRemark
())){
arg
.
setRemark
(
""
);
}
});
if
(
CollectionUtil
.
isEmpty
(
planStandardPurchaseVos
))
{
if
(
CollectionUtil
.
isEmpty
(
planStandardPurchaseVos
))
{
log
.
debug
(
"没找到数据!"
);
log
.
debug
(
"没找到数据!"
);
return
;
return
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/StandardServiceImpl.java
View file @
cceb39b8
...
@@ -77,6 +77,8 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -77,6 +77,8 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
private
WeiXinService
weiXinService
;
private
WeiXinService
weiXinService
;
@Value
(
"${weixin.systemUrl}"
)
@Value
(
"${weixin.systemUrl}"
)
private
String
systemUrl
;
private
String
systemUrl
;
@Resource
private
SupplierMapper
supplierMapper
;
/**
/**
...
@@ -179,12 +181,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -179,12 +181,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
}
}
Standard
standard
=
new
Standard
();
Standard
standard
=
new
Standard
();
BeanUtils
.
copyProperties
(
query
,
standard
);
BeanUtils
.
copyProperties
(
query
,
standard
);
if
(
query
.
getEnterNum
()
!=
null
&&
query
.
getUnitStock
()
!=
null
){
//新增时 库存数量直接改为0
standard
.
setStockNum
(
new
BigDecimal
(
0
));
/* if(query.getEnterNum() != null && query.getUnitStock() != null){
BigDecimal stockNum = new BigDecimal(query.getEnterNum()).multiply(query.getUnitStock());
BigDecimal stockNum = new BigDecimal(query.getEnterNum()).multiply(query.getUnitStock());
standard.setStockNum(stockNum);
standard.setStockNum(stockNum);
}else{
}else{
standard.setStockNum(new BigDecimal(0));
standard.setStockNum(new BigDecimal(0));
}
}
*/
standard
.
setStatus
(
1
)
standard
.
setStatus
(
1
)
.
setCreateTime
(
LocalDateTime
.
now
());
.
setCreateTime
(
LocalDateTime
.
now
());
standardMapper
.
insert
(
standard
);
standardMapper
.
insert
(
standard
);
...
@@ -208,14 +212,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -208,14 +212,14 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
}
}
standardValueService
.
saveBatch
(
standardValueList
);
standardValueService
.
saveBatch
(
standardValueList
);
}
}
//标样入库记录添加
/*
//标样入库记录添加
StandardEnter enter = new StandardEnter();
StandardEnter enter = new StandardEnter();
enter.setStandardId(standard.getId())
enter.setStandardId(standard.getId())
.setUserId(loginUser.getId())
.setUserId(loginUser.getId())
.setEnterNum(query.getEnterNum()) //入库数量 多少瓶
.setEnterNum(query.getEnterNum()) //入库数量 多少瓶
.setCreateTime(LocalDateTime.now())
.setCreateTime(LocalDateTime.now())
.setRemark("新增标样");
.setRemark("新增标样");
standardEnterMapper
.
insert
(
enter
);
standardEnterMapper.insert(enter);
*/
//保存标样材料信息
//保存标样材料信息
Boolean
ref
=
commonService
.
saveEntityEnclosure
(
EntityEnclosure
.
EntityType
.
STANDARD_SAMPLE
,
standard
.
getId
(),
query
.
getEnclosureQueryList
());
Boolean
ref
=
commonService
.
saveEntityEnclosure
(
EntityEnclosure
.
EntityType
.
STANDARD_SAMPLE
,
standard
.
getId
(),
query
.
getEnclosureQueryList
());
if
(!
ref
)
{
if
(!
ref
)
{
...
@@ -246,10 +250,10 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -246,10 +250,10 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
}
}
Standard
standard
=
new
Standard
();
Standard
standard
=
new
Standard
();
BeanUtils
.
copyProperties
(
query
,
standard
);
BeanUtils
.
copyProperties
(
query
,
standard
);
if
(
query
.
getEnterNum
()
!=
null
&&
query
.
getUnitStock
()
!=
null
){
/*
if(query.getEnterNum() != null && query.getUnitStock() != null){
BigDecimal stockNum = new BigDecimal(query.getEnterNum()).multiply(query.getUnitStock());
BigDecimal stockNum = new BigDecimal(query.getEnterNum()).multiply(query.getUnitStock());
standard.setStockNum(stockNum);
standard.setStockNum(stockNum);
}
}
*/
standardMapper
.
updateById
(
standard
);
standardMapper
.
updateById
(
standard
);
//添加标准值
//添加标准值
if
(
query
.
getStandardValueQueryList
()
!=
null
&&
query
.
getStandardValueQueryList
().
size
()
>
0
)
{
if
(
query
.
getStandardValueQueryList
()
!=
null
&&
query
.
getStandardValueQueryList
().
size
()
>
0
)
{
...
@@ -313,8 +317,16 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -313,8 +317,16 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
if
(
standard
==
null
)
{
if
(
standard
==
null
)
{
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
}
StandardVo
standardVo
=
new
StandardVo
();
StandardVo
standardVo
=
new
StandardVo
();
BeanUtils
.
copyProperties
(
standard
,
standardVo
);
BeanUtils
.
copyProperties
(
standard
,
standardVo
);
Supplier
supplier
=
supplierMapper
.
selectById
(
standard
.
getSupplierId
());
if
(
supplier
!=
null
){
standardVo
.
setSupplierName
(
supplier
.
getName
());
}
List
<
EntityEnclosure
>
entityEnclosureList
=
commonService
.
getEnclosureList
List
<
EntityEnclosure
>
entityEnclosureList
=
commonService
.
getEnclosureList
(
EntityEnclosure
.
EntityType
.
STANDARD_SAMPLE
,
standard
.
getId
());
(
EntityEnclosure
.
EntityType
.
STANDARD_SAMPLE
,
standard
.
getId
());
...
@@ -351,16 +363,19 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -351,16 +363,19 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
if
(
standard
==
null
)
{
if
(
standard
==
null
)
{
return
BaseResponse
.
errorMsg
(
"数据错误!"
);
return
BaseResponse
.
errorMsg
(
"数据错误!"
);
}
}
StandardEnter
enter
=
new
StandardEnter
();
if
(
query
.
getEnterNum
()
!=
null
){
enter
.
setStandardId
(
standard
.
getId
())
BigDecimal
enterNums
=
standard
.
getUnitStock
().
multiply
(
query
.
getEnterNum
());
.
setUserId
(
userService
.
getLoginUser
().
getId
())
StandardEnter
enter
=
new
StandardEnter
();
.
setEnterNum
(
query
.
getEnterNum
())
enter
.
setStandardId
(
standard
.
getId
())
.
setCreateTime
(
LocalDateTime
.
now
())
.
setUserId
(
userService
.
getLoginUser
().
getId
())
.
setRemark
(
query
.
getRemark
());
.
setEnterNum
(
enterNums
)
.
setCreateTime
(
LocalDateTime
.
now
())
.
setRemark
(
query
.
getRemark
());
standardEnterMapper
.
insert
(
enter
);
standard
.
setStockNum
(
standard
.
getStockNum
().
add
(
enter
.
getEnterNum
()));
standardMapper
.
updateById
(
standard
);
}
standardEnterMapper
.
insert
(
enter
);
standard
.
setStockNum
(
standard
.
getStockNum
().
add
(
standard
.
getUnitStock
().
multiply
(
new
BigDecimal
(
query
.
getEnterNum
()))));
standardMapper
.
updateById
(
standard
);
return
BaseResponse
.
okData
(
"新增入库完成"
);
return
BaseResponse
.
okData
(
"新增入库完成"
);
}
}
...
@@ -380,15 +395,18 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
...
@@ -380,15 +395,18 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
if
(
standard
==
null
)
{
if
(
standard
==
null
)
{
return
BaseResponse
.
errorMsg
(
"数据错误!"
);
return
BaseResponse
.
errorMsg
(
"数据错误!"
);
}
}
StandardOut
out
=
new
StandardOut
();
if
(
query
.
getOutNum
()
!=
null
){
out
.
setStandardId
(
standard
.
getId
())
StandardOut
out
=
new
StandardOut
();
.
setUserId
(
userService
.
getLoginUser
().
getId
())
out
.
setStandardId
(
standard
.
getId
())
.
setCollectNum
(
query
.
getOutNum
())
.
setUserId
(
userService
.
getLoginUser
().
getId
())
.
setCreateTime
(
LocalDateTime
.
now
())
.
setCollectNum
(
query
.
getOutNum
())
.
setRemark
(
query
.
getRemark
());
.
setCreateTime
(
LocalDateTime
.
now
())
standardOutMapper
.
insert
(
out
);
.
setRemark
(
query
.
getRemark
());
standard
.
setStockNum
(
standard
.
getStockNum
().
subtract
(
out
.
getCollectNum
()));
standardOutMapper
.
insert
(
out
);
standardMapper
.
updateById
(
standard
);
standard
.
setStockNum
(
standard
.
getStockNum
().
subtract
(
out
.
getCollectNum
()));
standardMapper
.
updateById
(
standard
);
}
return
BaseResponse
.
okData
(
"领用出库完成"
);
return
BaseResponse
.
okData
(
"领用出库完成"
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SupplierServiceImpl.java
View file @
cceb39b8
...
@@ -177,30 +177,53 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
...
@@ -177,30 +177,53 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
if
(
suppliernclosure
==
null
){
if
(
suppliernclosure
==
null
){
return
BaseResponse
.
errorMsg
(
"附件信息错误"
);
return
BaseResponse
.
errorMsg
(
"附件信息错误"
);
}
}
supplierEnclosureMapper
.
deleteById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
/**
* 删除供应商
* @param id
* @return
*/
@Transactional
@Override
public
BaseResponse
<
String
>
deleteSupplier
(
Integer
id
)
{
if
(
id
==
null
){
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
Supplier
supplier
=
supplierMapper
.
selectById
(
id
);
if
(
supplier
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误"
);
}
QueryWrapper
<
Standard
>
standardQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Standard
>
standardQueryWrapper
=
new
QueryWrapper
<>();
standardQueryWrapper
.
eq
(
"supplier_id"
,
supplier
nclosure
.
getId
());
standardQueryWrapper
.
eq
(
"supplier_id"
,
supplier
.
getId
());
Integer
standardCounts
=
standardMapper
.
selectCount
(
standardQueryWrapper
);
Integer
standardCounts
=
standardMapper
.
selectCount
(
standardQueryWrapper
);
if
(
standardCounts
>
0
){
if
(
standardCounts
>
0
){
return
BaseResponse
.
errorMsg
(
"有"
+
standardCounts
+
"个标样正在使用"
);
return
BaseResponse
.
errorMsg
(
"有"
+
standardCounts
+
"个标样正在使用"
);
}
}
QueryWrapper
<
Equipment
>
equipmentQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Equipment
>
equipmentQueryWrapper
=
new
QueryWrapper
<>();
equipmentQueryWrapper
.
eq
(
"supplier_id"
,
supplier
nclosure
.
getId
());
equipmentQueryWrapper
.
eq
(
"supplier_id"
,
supplier
.
getId
());
Integer
equipmentCounts
=
equipmentMapper
.
selectCount
(
equipmentQueryWrapper
);
Integer
equipmentCounts
=
equipmentMapper
.
selectCount
(
equipmentQueryWrapper
);
if
(
equipmentCounts
>
0
){
if
(
equipmentCounts
>
0
){
return
BaseResponse
.
errorMsg
(
"有"
+
equipmentCounts
+
"个设备正在使用"
);
return
BaseResponse
.
errorMsg
(
"有"
+
equipmentCounts
+
"个设备正在使用"
);
}
}
QueryWrapper
<
Consumables
>
consumablesQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Consumables
>
consumablesQueryWrapper
=
new
QueryWrapper
<>();
consumablesQueryWrapper
.
eq
(
"supplier_id"
,
supplier
nclosure
.
getId
());
consumablesQueryWrapper
.
eq
(
"supplier_id"
,
supplier
.
getId
());
Integer
consumablesCounts
=
consumablesMapper
.
selectCount
(
consumablesQueryWrapper
);
Integer
consumablesCounts
=
consumablesMapper
.
selectCount
(
consumablesQueryWrapper
);
if
(
consumablesCounts
>
0
){
if
(
consumablesCounts
>
0
){
return
BaseResponse
.
errorMsg
(
"有"
+
consumablesCounts
+
"个消耗品正在使用"
);
return
BaseResponse
.
errorMsg
(
"有"
+
consumablesCounts
+
"个消耗品正在使用"
);
}
}
supplier
Enclosure
Mapper
.
deleteById
(
id
);
supplierMapper
.
deleteById
(
id
);
return
BaseResponse
.
okData
(
"
附件信息
删除成功"
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment