功能修复

This commit is contained in:
hayu 2024-03-25 18:20:42 +08:00
parent 518bb466e6
commit f64ebf1aea
4 changed files with 30 additions and 2 deletions

View File

@ -106,4 +106,11 @@ public interface PurchaseCheckInfoMapper
* @return
*/
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
/**
* 查询 类型名称和管理类型
* @param taskId
* @return
*/
List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);
}

View File

@ -116,7 +116,16 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo) {
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoList(purchaseCheckInfo);
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"1");
String typeName="";
List<PurchaseCheckInfo> list = purchaseCheckInfoMapper.selectTypeNameAndManageTypeByTaskId(checkInfo.getTaskId());
if (list.size()>0){
typeName = list.get(0).getPurchasingTypeName();
if (list.get(0).getManageType().contains("0")){
checkInfo.setManageType("0");
}else {
checkInfo.setManageType("1");
}
}
checkInfo.setPurchasingTypeName(typeName);
}
return purchaseCheckInfos;

View File

@ -281,4 +281,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null "> and pci.company_id = #{companyId}</if>
order by pci.id desc
</select>
<select id="selectTypeNameAndManageTypeByTaskId"
resultType="com.bonus.sgzb.material.domain.PurchaseCheckInfo">
select GROUP_CONCAT(type_name) purchasingTypeName, GROUP_CONCAT(manage_type) manageType from
(select distinct pcd.task_id, mt1.type_name,IFNULL(mt.manage_type,'0') as manage_type
from purchase_check_details pcd
left join ma_type mt on pcd.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
where pcd.task_id = #{taskId}
) t
GROUP BY task_id
</select>
</mapper>

View File

@ -145,7 +145,7 @@
size="mini"
type="warning"
icon="el-icon-edit"
v-if="scope.row.purchasingStatus=='已验收合格' ||scope.row.purchasingStatus=='待审核'"
v-if="(scope.row.purchasingStatus=='已验收合格' ||scope.row.purchasingStatus=='待审核') && scope.row.manageType!='1'"
@click="handleCode(scope.row)"
>编码管理</el-button>
<el-button