禅道bug解决
This commit is contained in:
parent
daa1173dca
commit
45156dc7e2
|
|
@ -186,6 +186,7 @@ public class SltAgreementInfo {
|
||||||
private Integer codeNum;
|
private Integer codeNum;
|
||||||
private Integer unitId;
|
private Integer unitId;
|
||||||
private Integer lotId;
|
private Integer lotId;
|
||||||
|
private Integer leaseType;
|
||||||
private List<SltAgreementInfo> node;
|
private List<SltAgreementInfo> node;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
MachinePart machinePart = tmTaskMapper.getMachineParts(typeId);
|
MachinePart machinePart = tmTaskMapper.getMachineParts(typeId);
|
||||||
machinePart.setParentId(record.getId().intValue());
|
machinePart.setParentId(record.getId().intValue());
|
||||||
int countMachineByPidAndTid = tmTaskMapper.getCountMachineByPidAndTid(machinePart);
|
int countMachineByPidAndTid = tmTaskMapper.getCountMachineByPidAndTid(machinePart);
|
||||||
Double machinePartNum = typeId.getPartNum() * Double.parseDouble(backApplyInfo.getPreNum());
|
Double machinePartNum = typeId.getPartNum() * Double.parseDouble(backApplyInfo.getAuditNum());
|
||||||
count1 += machinePartNum;
|
count1 += machinePartNum;
|
||||||
count2 += countMachineByPidAndTid;
|
count2 += countMachineByPidAndTid;
|
||||||
machinePart.setPartNum(machinePartNum - countMachineByPidAndTid);
|
machinePart.setPartNum(machinePartNum - countMachineByPidAndTid);
|
||||||
|
|
@ -65,7 +65,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
if (count1 == count2) {
|
if (count1 == count2) {
|
||||||
backApplyInfo.setPartNum(0);
|
backApplyInfo.setPartNum(0);
|
||||||
} else {
|
} else {
|
||||||
backApplyInfo.setPartNum((int) Double.parseDouble(backApplyInfo.getPreNum()));
|
backApplyInfo.setPartNum((int) Double.parseDouble(backApplyInfo.getAuditNum()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -542,8 +542,8 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insStlInfoTwo">
|
<insert id="insStlInfoTwo">
|
||||||
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id)
|
insert into slt_agreement_info (agreement_id,type_id,ma_id,num,start_time,status,lease_id,lease_price,buy_price,is_slt,company_id,lease_type)
|
||||||
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId});
|
values (#{info.agreementId},#{info.typeId},#{info.maId},#{many},#{info.startTime},#{info.status},#{info.leaseId},#{info.leasePrice},#{info.buyPrice},'0',#{info.companyId},#{info.leaseType});
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -664,7 +664,8 @@
|
||||||
mt.type_name as typeCode,
|
mt.type_name as typeCode,
|
||||||
mt.unit_name as unitName,
|
mt.unit_name as unitName,
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
bad.audit_num as preNum,
|
bad.pre_num as preNum,
|
||||||
|
bad.audit_num as auditNum,
|
||||||
bad.status as status,
|
bad.status as status,
|
||||||
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
|
|
@ -860,6 +861,7 @@
|
||||||
end_time AS endTime,
|
end_time AS endTime,
|
||||||
status AS status,
|
status AS status,
|
||||||
lease_id AS leaseId,
|
lease_id AS leaseId,
|
||||||
|
lease_type AS leaseType,
|
||||||
back_id AS backId,
|
back_id AS backId,
|
||||||
lease_price AS leasePrice,
|
lease_price AS leasePrice,
|
||||||
buy_price AS buyPrice,
|
buy_price AS buyPrice,
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,16 @@ public class PurchaseMacodeInfo extends BaseEntity
|
||||||
@ApiModelProperty(value = "单位名称")
|
@ApiModelProperty(value = "单位名称")
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String userId;
|
||||||
|
|
||||||
/** 审核员用户id */
|
/** 审核员用户id */
|
||||||
@ApiModelProperty(value = "审核员用户id")
|
@ApiModelProperty(value = "审核员用户id")
|
||||||
private List<String> userIds;
|
private List<String> userIds;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
||||||
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoList(PurchaseMacodeInfo purchaseMacodeInfo) {
|
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoList(PurchaseMacodeInfo purchaseMacodeInfo) {
|
||||||
List<PurchaseMacodeInfo> purchaseMacodeInfoList = purchaseMacodeInfoMapper.selectPurchaseMacodeInfoList(purchaseMacodeInfo);
|
List<PurchaseMacodeInfo> purchaseMacodeInfoList = purchaseMacodeInfoMapper.selectPurchaseMacodeInfoList(purchaseMacodeInfo);
|
||||||
//判断有没有绑定固定资产
|
//判断有没有绑定固定资产
|
||||||
if (purchaseMacodeInfoList.size() > 0 && purchaseMacodeInfoList.get(0).getFixCode()!=null){
|
if (purchaseMacodeInfoList.size() > 0/* && purchaseMacodeInfoList.get(0).getFixCode()!=null*/){
|
||||||
Map<Object,Long> groupCounts = purchaseMacodeInfoList.stream().map(PurchaseMacodeInfo::getTypeId).collect(Collectors.groupingBy(String::valueOf, Collectors.counting()));
|
Map<Object,Long> groupCounts = purchaseMacodeInfoList.stream().map(PurchaseMacodeInfo::getTypeId).collect(Collectors.groupingBy(String::valueOf, Collectors.counting()));
|
||||||
// 根据 typeId 进行去重
|
// 根据 typeId 进行去重
|
||||||
purchaseMacodeInfoList = purchaseMacodeInfoList.stream()
|
purchaseMacodeInfoList = purchaseMacodeInfoList.stream()
|
||||||
|
|
@ -433,12 +433,14 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PurchaseMacodeInfo> selectPutinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
|
public List<PurchaseMacodeInfo> selectPutinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
|
||||||
|
Long userid = SecurityUtils.getLoginUser().getUserid();
|
||||||
|
purchaseMacodeInfo.setUserId(userid.toString());
|
||||||
List<PurchaseMacodeInfo> purchaseMacodeInfos = purchaseMacodeInfoMapper.selectPutinDetails(purchaseMacodeInfo);
|
List<PurchaseMacodeInfo> purchaseMacodeInfos = purchaseMacodeInfoMapper.selectPutinDetails(purchaseMacodeInfo);
|
||||||
for (PurchaseMacodeInfo macodeInfo : purchaseMacodeInfos) {
|
/* for (PurchaseMacodeInfo macodeInfo : purchaseMacodeInfos) {
|
||||||
List<String> userIds = purchaseMacodeInfoMapper.selectKeepUser(macodeInfo.getTypeId().intValue());
|
List<String> userIds = purchaseMacodeInfoMapper.selectKeepUser(macodeInfo.getTypeId().intValue());
|
||||||
userIds.add("1");
|
userIds.add("1");
|
||||||
macodeInfo.setUserIds(userIds);
|
macodeInfo.setUserIds(userIds);
|
||||||
}
|
}*/
|
||||||
return purchaseMacodeInfos;
|
return purchaseMacodeInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -351,18 +351,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||||
select pcd.production_time productionTime,
|
select pcd.production_time as productionTime,
|
||||||
mt.type_name specificationType,
|
mt.type_name as specificationType,
|
||||||
mt1.type_name typeName,
|
mt1.type_name as typeName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
pmi.ma_code maCode,
|
pmi.ma_code as maCode,
|
||||||
mm.assets_code assetsCode,
|
mm.assets_code as assetsCode,
|
||||||
pmi.fix_code fixCode,
|
pmi.fix_code as fixCode,
|
||||||
pcd.type_id typeId,
|
pcd.type_id as typeId,
|
||||||
pcd.task_id taskId,
|
pcd.task_id as taskId,
|
||||||
mt.code specsCode,
|
mt.code as specsCode,
|
||||||
mt.num num,
|
mt.num as num,
|
||||||
mt1.code typeCode,
|
mt1.code as typeCode,
|
||||||
CASE
|
CASE
|
||||||
WHEN pmi.ma_code is null THEN
|
WHEN pmi.ma_code is null THEN
|
||||||
CASE
|
CASE
|
||||||
|
|
@ -372,16 +372,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
END
|
END
|
||||||
ELSE pmi.status
|
ELSE pmi.status
|
||||||
END AS status,
|
END AS status,
|
||||||
mm.qr_code qrCode,
|
mm.qr_code as qrCode,
|
||||||
mm.ma_id maId,
|
mm.ma_id as maId,
|
||||||
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
||||||
from purchase_check_details pcd
|
from purchase_check_details pcd
|
||||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
||||||
|
LEFT JOIN ma_type_keeper mtk on pcd.type_id = mtk.type_id
|
||||||
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
||||||
left join ma_type mt on pcd.type_id = mt.type_id
|
left join ma_type mt on pcd.type_id = mt.type_id
|
||||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||||
where pcd.task_id = #{taskId}
|
where pcd.task_id = #{taskId}
|
||||||
and pcd.`status`!=3 and pcd.`status`!=7
|
and pcd.`status`!=3 and pcd.`status`!=7
|
||||||
|
<if test="userId != 1">
|
||||||
|
and mtk.user_id = #{userId}
|
||||||
|
</if>
|
||||||
<if test="dictName != null and dictName != ''">
|
<if test="dictName != null and dictName != ''">
|
||||||
and (mt.type_name like concat('%',#{dictName},'%') or
|
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||||
mt1.type_name like concat('%',#{dictName},'%'))
|
mt1.type_name like concat('%',#{dictName},'%'))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue