Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx

This commit is contained in:
BianLzhaoMin 2024-06-05 10:08:50 +08:00
commit 924765b242
5 changed files with 67 additions and 40 deletions

View File

@ -13,12 +13,14 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.common.security.utils.SecurityUtils; import com.bonus.sgzb.common.security.utils.SecurityUtils;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 新购入库-app * 新购入库-app
*
* @author bns_han * @author bns_han
*/ */
@RestController @RestController
@ -42,10 +44,10 @@ public class PurchaseInputController extends BaseController {
//判断该组织是否开启综合服务中心审核 //判断该组织是否开启综合服务中心审核
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId(); Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
int re = purchaseInputService.selectExamineType(companyId); int re = purchaseInputService.selectExamineType(companyId);
if (re>0){ if (re > 0) {
list = purchaseInputService.selectPutInListExamine(bean); list = purchaseInputService.selectPutInListExamine(bean);
}else { } else {
list =purchaseInputService.getList(bean); list = purchaseInputService.getList(bean);
} }
return success(list); return success(list);
} catch (Exception e) { } catch (Exception e) {
@ -58,10 +60,9 @@ public class PurchaseInputController extends BaseController {
*/ */
@ApiOperation(value = "新购入库清单明细") @ApiOperation(value = "新购入库清单明细")
@GetMapping(value = "/putinDetails") @GetMapping(value = "/putinDetails")
public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
{
try { try {
List<PurchaseMacodeInfo> list =purchaseInputService.selectPutinDetails(purchaseMacodeInfo); List<PurchaseMacodeInfo> list = purchaseInputService.selectPutinDetails(purchaseMacodeInfo);
return success(list); return success(list);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);

View File

@ -38,7 +38,7 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
if (StringHelper.isNotEmpty(typeIds)) { if (StringHelper.isNotEmpty(typeIds)) {
String[] splitTypeIds = typeIds.split("@"); String[] splitTypeIds = typeIds.split("@");
//先删除在去添加 //先删除在去添加
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds); // warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
for (String typeId : splitTypeIds) { for (String typeId : splitTypeIds) {
WarehouseKeeper beans = new WarehouseKeeper(); WarehouseKeeper beans = new WarehouseKeeper();
beans.setTypeIds(typeId); beans.setTypeIds(typeId);

View File

@ -25,7 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT mt.type_id as modelId ,mt.type_name as modelName, SELECT mt.type_id as modelId ,mt.type_name as modelName,
mt2.type_name as typeName, mt2.type_name as typeName,
mt4.type_name as kindName, mt4.type_name as kindName,
su.user_id as userId, su.nick_name as userName su.user_id as userId,
GROUP_CONCAT(su.nick_name) as userName
FROM ma_type mt FROM ma_type mt
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3' LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2' LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
@ -36,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeName != null and typeName != ''"> <if test="typeName != null and typeName != ''">
AND mt2.type_name like concat('%', #{typeName}, '%') AND mt2.type_name like concat('%', #{typeName}, '%')
</if> </if>
GROUP BY mt.type_id
ORDER BY mt.type_id DESC ORDER BY mt.type_id DESC
</select> </select>

View File

@ -117,6 +117,18 @@ public class PurchaseMacodeInfo extends BaseEntity
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String unitName; private String unitName;
public String getUserIds() {
return userIds;
}
public void setUserIds(String userIds) {
this.userIds = userIds;
}
/** 审核员用户id */
@ApiModelProperty(value = "审核员用户id")
private String userIds;
/** /**
* 类型管理方式 * 类型管理方式
*/ */

View File

@ -352,41 +352,53 @@ 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
mt.type_name specificationType, pcd.production_time productionTime,
mt1.type_name typeName, mt.type_name specificationType,
mt.manage_type as manageType, mt1.type_name typeName,
pmi.ma_code maCode, mt.manage_type AS manageType,
mm.assets_code assetsCode, pmi.ma_code maCode,
pmi.fix_code fixCode, mm.assets_code assetsCode,
pcd.type_id typeId, pmi.fix_code fixCode,
pcd.task_id taskId, pcd.type_id typeId,
mt.code specsCode, pcd.task_id taskId,
mt1.code typeCode, mt.CODE specsCode,
CASE mt1.CODE typeCode,
WHEN pmi.ma_code is null THEN GROUP_CONCAT( mtk.user_id ) AS userIds,
CASE CASE
WHEN pcd.status = 4 THEN 1 WHEN pmi.ma_code IS NULL THEN
WHEN pcd.status = 5 THEN 2 CASE
ELSE 0
END WHEN pcd.STATUS = 4 THEN
ELSE pmi.status 1
END AS status, WHEN pcd.STATUS = 5 THEN
mm.qr_code qrCode, 2 ELSE 0
mm.ma_id maId, END ELSE pmi.STATUS
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum END AS STATUS,
from purchase_check_details pcd mm.qr_code qrCode,
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id mm.ma_id maId,
left join ma_machine mm on pmi.ma_code = mm.ma_code IF( pmi.ma_code IS NOT NULL, 1, pcd.check_num ) checkNum
left join ma_type mt on pcd.type_id = mt.type_id FROM
left join ma_type mt1 on mt.parent_id = mt1.type_id purchase_check_details pcd
where pcd.task_id = #{taskId} LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
and pcd.`status`!=3 and pcd.`status`!=7 AND pmi.type_id = pcd.type_id
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 mt1 ON mt.parent_id = mt1.type_id
LEFT JOIN ma_type_keeper mtk ON mtk.type_id = pcd.type_id
WHERE
pcd.task_id = #{taskId}
AND pcd.`status` != 3
AND pcd.`status` != 7
<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},'%'))
</if> </if>
order by status, pmi.id GROUP BY
pcd.type_id
ORDER BY
STATUS,
pmi.id
</select> </select>
<select id="selectMaCode" resultType="java.lang.Integer"> <select id="selectMaCode" resultType="java.lang.Integer">
select count(ma_id) from ma_machine where ma_code = #{maCode} select count(ma_id) from ma_machine where ma_code = #{maCode}