This commit is contained in:
zzyuan 2024-04-25 17:03:59 +08:00
commit c829701efc
15 changed files with 463 additions and 230 deletions

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.app.controller;
import cn.hutool.core.collection.CollUtil;
import com.bonus.sgzb.app.domain.StorageStatus;
import com.bonus.sgzb.app.service.HoldingLedgerService;
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
import com.bonus.sgzb.common.core.web.controller.BaseController;
@ -30,9 +31,8 @@ public class CompositeQueryController extends BaseController {
*/
@Log(title = "抱杆台账查询", businessType = BusinessType.UPDATE)
@GetMapping("/getHoldingLedger")
public AjaxResult getHoldingLedger() {
public AjaxResult getHoldingLedger(StorageStatus storageStatus) {
startPage();
return AjaxResult.success(getDataTable(holdingLedgerService.getHoldingLedger()));
return AjaxResult.success(getDataTable(holdingLedgerService.getHoldingLedger(storageStatus)));
}
}

View File

@ -4,10 +4,9 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.PhoneUtil;
import com.bonus.sgzb.app.domain.*;
import com.bonus.sgzb.app.service.LeaseApplyDetailsService;
import com.bonus.sgzb.app.service.LeaseApplyInfoService;
import com.bonus.sgzb.app.service.LeaseUserBookService;
import com.bonus.sgzb.app.service.TmTaskService;
import com.bonus.sgzb.app.service.*;
import com.bonus.sgzb.base.api.domain.MaType;
import com.bonus.sgzb.base.service.ITypeService;
import com.bonus.sgzb.common.core.utils.ListPagingUtil;
import com.bonus.sgzb.common.core.utils.ServletUtils;
import com.bonus.sgzb.common.core.utils.StringUtils;
@ -25,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@ -59,6 +59,9 @@ public class TmTaskController extends BaseController {
@Autowired
private LeaseUserBookService leaseUserBookService;
@Resource
private ITypeService iTypeService;
private final static String STRING_ADMIN = "admin";
/**
@ -245,6 +248,15 @@ public class TmTaskController extends BaseController {
}
}
}
//修改库存
List<LeaseApplyDetails> leaseApplyDetailsList = task.getLeaseApplyDetails();
MaType maType = new MaType();
for (LeaseApplyDetails leaseApplyDetails : leaseApplyDetailsList) {
maType.setTypeId(Long.valueOf(leaseApplyDetails.getTypeId()));
maType.setNum(BigDecimal.valueOf(leaseApplyDetails.getNum()-leaseApplyDetails.getPreNum()));
iTypeService.updateMaType(maType);
}
if (StringUtils.isEmpty(taskId)) {
return AjaxResult.error("任务编号为空,创建失败");
}

View File

@ -0,0 +1,210 @@
package com.bonus.sgzb.app.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/**
* @description 综合查询--成套抱杆查询
* @author hay
* @date 2024/2/26 14:51
*/
@ApiModel(description = "成套抱杆查询")
@Data
public class StorageStatus {
private static final long serialVersionUID = 2227217051604273598L;
@ApiModelProperty(value = "")
private Integer id;
/**
* 协议号
*/
@ApiModelProperty(value = "协议号")
private String agreementCode;
/**
* 类型名称
*/
@ApiModelProperty(value = "类型名称")
@Excel(name = "机具名称")
private String typeName;
/**
* 规格ID
*/
@ApiModelProperty(value = "规格ID")
private Integer typeId;
/**
* 规格型号
*/
@ApiModelProperty(value = "规格型号")
@Excel(name = "规格名称")
private String typeModelName;
/**
* 计量单位
*/
@ApiModelProperty(value = "计量单位")
@Excel(name = "单位")
private String unit;
/**
* 在库数量
*/
@ApiModelProperty(value = "在库数量")
@Excel(name = "在库数量",cellType = Excel.ColumnType.NUMERIC)
private Double num;
/**
* 在用数量
*/
@ApiModelProperty(value = "在用数量")
@Excel(name = "在用数量",cellType = Excel.ColumnType.NUMERIC)
private Double usNum;
/**
* 在修数量
*/
@ApiModelProperty(value = "在修数量")
@Excel(name = "在修数量",cellType = Excel.ColumnType.NUMERIC)
private Double repairNum;
/**
* 修试后待入库
*/
@ApiModelProperty(value = "修试后待入库")
@Excel(name = "修试后待入库",cellType = Excel.ColumnType.NUMERIC)
private Double repairInputNum;
/**
* 新购待入库
*/
@ApiModelProperty(value = "新购待入库")
@Excel(name = "新购待入库",cellType = Excel.ColumnType.NUMERIC)
private Double inputNum;
/**
* 总保有量
*/
@ApiModelProperty(value = "总保有量")
@Excel(name = "总保有量",cellType = Excel.ColumnType.NUMERIC)
private Double allNum;
/**
* 是否计数
*/
@ApiModelProperty(value = "是否计数")
@Excel(name = "是否计数")
private String manageType;
/**
* 租赁数量
*/
@ApiModelProperty(value = "租赁数量")
@Excel(name = "租赁数量",cellType = Excel.ColumnType.NUMERIC)
private Double outNum;
/**
* 归还数量
*/
@ApiModelProperty(value = "归还数量")
@Excel(name = "归还数量",cellType = Excel.ColumnType.NUMERIC)
private Double backNum;
/**
* 在用总价值
*/
@ApiModelProperty(value = "在用总价值")
private Double usPrice;
/**
* 投入总价值
*/
@ApiModelProperty(value = "投入总价值")
private Double totalPrice;
/**
* 退料人
*/
@ApiModelProperty(value = "退料人")
private String backPerson;
/**
* 创建者
*/
@ApiModelProperty(value = "创建者")
private String createBy;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新者
*/
@ApiModelProperty(value = "更新者")
private String updateBy;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间 ")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
/**
* 关键字
*/
@ApiModelProperty(value = "关键字")
private String keyWord;
@ApiModelProperty(value="开始时间")
private String startTime;
@ApiModelProperty(value="结束时间")
private String endTime;
/**
* 设备所属类型
*/
@ApiModelProperty(value = "数据所属组织")
private Integer companyId;
/**
* 装备管理方式(0编号 1计数)
*/
@ApiModelProperty(value = "装备管理方式名称")
private String manageTypeName;
@ApiModelProperty(value = "成套机具配件详细")
private List<MachinePart> wholeSetDetails;
}

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.app.mapper;
import com.bonus.sgzb.app.domain.MachinePart;
import com.bonus.sgzb.app.domain.StorageStatus;
import com.bonus.sgzb.app.domain.TmTask;
import org.apache.ibatis.annotations.Mapper;
@ -12,9 +13,7 @@ import java.util.List;
*/
@Mapper
public interface HoldingLedgerMapper {
List<TmTask> getHoldingLedger();
List<StorageStatus> getHoldingLedger(StorageStatus storageStatus);
List<TmTask> getHoldingLedgerDetail(TmTask tmTask);
MachinePart getMachineParts(TmTask typeId);
List<MachinePart> getWholeSetDetails(StorageStatus storageStatus);
}

View File

@ -101,4 +101,6 @@ public interface LeaseOutDetailsMapper {
int updateMaTypeStockNumCt(TmTask record);
int getmaChineByCt(LeaseOutDetails record);
void updateMaTypeNum(LeaseApplyDetails leaseApplyDetails);
}

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.app.service;
import com.bonus.sgzb.app.domain.StorageStatus;
import com.bonus.sgzb.app.domain.TmTask;
import java.util.List;
@ -9,5 +10,5 @@ import java.util.List;
* @date2024/4/19 - 17:48
*/
public interface HoldingLedgerService{
List<TmTask> getHoldingLedger();
List<StorageStatus> getHoldingLedger(StorageStatus storageStatus);
}

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.app.service.impl;
import com.bonus.sgzb.app.domain.MachinePart;
import com.bonus.sgzb.app.domain.StorageStatus;
import com.bonus.sgzb.app.domain.TmTask;
import com.bonus.sgzb.app.mapper.HoldingLedgerMapper;
import com.bonus.sgzb.app.service.HoldingLedgerService;
@ -21,17 +22,14 @@ public class HoldingLedgerImpl implements HoldingLedgerService {
private HoldingLedgerMapper holdingLedgerMapper;
@Override
public List<TmTask> getHoldingLedger() {
/*List<TmTask> holdingLedger = holdingLedgerMapper.getHoldingLedger();
for (TmTask tmTask : holdingLedger) {
List<TmTask> holdingLedgerDetail = holdingLedgerMapper.getHoldingLedgerDetail(tmTask);
holdingLedgerDetail.removeIf(item -> item == null);
for (TmTask typeId : holdingLedgerDetail) {
MachinePart machinePart = holdingLedgerMapper.getMachineParts(typeId);
machinePart.setPartNum((int) (typeId.getPartNum() * leaseApplyDetail.getPreNum()));
machineParts.add(machinePart);
public List<StorageStatus> getHoldingLedger(StorageStatus storageStatus) {
List<StorageStatus> holdingLedger = holdingLedgerMapper.getHoldingLedger(storageStatus);
if (holdingLedger.size() > 0) {
for (StorageStatus bean : holdingLedger) {
List<MachinePart> wholeSetDetails = holdingLedgerMapper.getWholeSetDetails(bean);
bean.setWholeSetDetails(wholeSetDetails);
}
}*/
return null;
}
return holdingLedger;
}
}

View File

@ -216,6 +216,8 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
MachinePart machinePart = leaseOutDetailsMapper.getMachineParts(typeId);
machinePart.setPartNum((int) (typeId.getPartNum() * record.getOutNum()));
typeId.setNum(machinePart.getNum() - machinePart.getPartNum());
res = leaseOutDetailsMapper.updateMaTypeStockNumCt(typeId);
}
} else {

View File

@ -69,5 +69,4 @@ public interface ITypeService {
List<MaType> getEquipmentType(Long typeId, String typeName);
}

View File

@ -307,6 +307,14 @@
WHERE
type_id = #{typeId}
</update>
<update id="updateMaTypeNum">
UPDATE
ma_type
SET
num = #{num} ,update_time = NOW()
WHERE
type_id = #{typeId}
</update>
<insert id="insertAgreementInfo">
insert into tm_task_agreement

View File

@ -3,39 +3,144 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.sgzb.app.mapper.HoldingLedgerMapper">
<select id="getHoldingLedger" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
mt.type_id as typeId,
mt.type_name as typeModelName,
mt2.type_name as typeName
FROM
ma_type mt
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
WHERE
mt.manage_type = 2
AND mt.LEVEL = 4
</select>
<select id="getHoldingLedgerDetail" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
mws2.type_id AS typeId,
mws2.part_num AS partNum
FROM
ma_type mt1
LEFT JOIN ma_whole_set mws2 ON mt1.type_id = mws2.parent_id
WHERE
mt1.type_id = #{typeId}
</select>
<select id="getMachineParts" resultType="com.bonus.sgzb.app.domain.MachinePart">
<select id="getHoldingLedger" resultType="com.bonus.sgzb.app.domain.StorageStatus">
SELECT
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
mt.type_id as modelId,
mt.unit_name as unitName,
m2.type_name As typeName
mt.unit_name AS unit,
mt.type_id AS typeId,
IFNULL( mt.num, 0 ) AS num,
IFNULL( subquery1.usNum, 0 ) AS usNum,
IFNULL( subquery2.repairNum, 0 ) AS repairNum,
IFNULL( subquery3.repairInputNum, 0 ) AS repairInputNum,
IFNULL( subquery4.inputNum, 0 ) AS inputNum,
IFNULL( mt.num, 0 ) + IFNULL( subquery1.usNum, 0 ) + IFNULL( subquery2.repairNum, 0 ) + IFNULL( subquery3.repairInputNum, 0 ) AS allNum,
CASE
mt.manage_type
WHEN 0 THEN
'否' ELSE '是'
END manageType
FROM
ma_type mt
LEFT JOIN ma_type m2 ON mt.parent_id = m2.type_id
LEFT JOIN (
SELECT
subquery1.type_id,
subquery1.typeName,
subquery1.typeModelName,
IFNULL( subquery1.outNum, 0 ) AS outNum,
IFNULL( subquery2.backNum, 0 ) AS backNum,
CASE
WHEN IFNULL( subquery1.outNum, 0 ) - IFNULL( subquery2.backNum, 0 ) > 0 THEN
IFNULL( subquery1.outNum, 0 ) - IFNULL( subquery2.backNum, 0 ) ELSE 0
END AS usNum
FROM
(
SELECT
mt.type_id,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
SUM(
IFNULL( lod.out_num, 0 )) AS outNum
FROM
lease_out_details lod
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
GROUP BY
mt.type_id
) AS subquery1
LEFT JOIN (
SELECT
mt.type_id,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
SUM(
IFNULL( bcd.back_num, 0 )) backNum
FROM
back_check_details bcd
LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
GROUP BY
mt.type_id
) AS subquery2 ON subquery1.type_id = subquery2.type_id
) AS subquery1 ON mt.type_id = subquery1.type_id
LEFT JOIN (
SELECT
mt.type_id,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
SUM(
IFNULL( rad.repair_num, 0 ) - IFNULL( rad.repaired_num, 0 ) - IFNULL( rad.scrap_num, 0 )) AS repairNum
FROM
repair_apply_details rad
LEFT JOIN ma_type mt ON mt.type_id = rad.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
WHERE
IFNULL( rad.repair_num, 0 ) - IFNULL( rad.repaired_num, 0 ) - IFNULL( rad.scrap_num, 0 ) > 0
GROUP BY
mt.type_id
) AS subquery2 ON subquery2.type_id = mt.type_id
LEFT JOIN (
SELECT
mt.type_id,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
SUM(
IFNULL( rid.repair_num, 0 ) - IFNULL( rid.input_num, 0 )) AS repairInputNum
FROM
repair_input_details rid
LEFT JOIN ma_type mt ON mt.type_id = rid.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
WHERE
IFNULL( rid.repair_num, 0 ) - IFNULL( rid.input_num, 0 ) > 0
GROUP BY
mt.type_id
) AS subquery3 ON subquery3.type_id = mt.type_id
LEFT JOIN (
SELECT
mt.type_id,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,
SUM(
IFNULL( pcd.check_num, 0 ) - IFNULL( pcd.input_num, 0 )) AS inputNum
FROM
purchase_check_details pcd
LEFT JOIN ma_type mt ON mt.type_id = pcd.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
WHERE
IFNULL( pcd.check_num, 0 ) - IFNULL( pcd.input_num, 0 ) > 0
GROUP BY
mt.type_id
) AS subquery4 ON subquery4.type_id = mt.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
WHERE
mt.type_id = #{typeId}
mt.`level` = 4
AND mt.del_flag = '0'
AND mt.manage_type = 2
<if test="typeId != null and typeId != ''">
and mt.type_id = #{typeId}
</if>
</select>
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.app.domain.MachinePart">
SELECT
mt2.type_name AS typeModelName,
mt2.type_id AS typeId,
mt3.type_name AS typeName,
aa.part_num AS partNum,
mt2.unit_name AS unitName
FROM
ma_type mt2
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
INNER JOIN (
SELECT
mws.type_id,
mws.part_num
FROM
ma_type mt
LEFT JOIN ma_whole_set mws ON mt.type_id = mws.parent_id
WHERE
mt.type_id = #{typeId}
) aa ON aa.type_id = mt2.type_id
</select>
</mapper>

View File

@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
select distinct pcd.task_id, pcd.type_id, pmi.qr_code, pmi.fix_code, pmi.code_type, pmi.status,
select pcd.task_id, pcd.type_id, pmi.qr_code, pmi.fix_code, pmi.code_type, pmi.status,
pmi.remark, pmi.company_id, mt.type_name specificationType, pt.arrival_time arrivalTime,
mt1.type_name typeName, pcd.check_num checkNum, pcd.purchase_num purchaseNum ,
IFNULL(pcd.bind_num,0) bindNum, mt.code typeCode,mt.model_code specsCode,pt.purchase_time purchaseTime

View File

@ -34,13 +34,12 @@ import com.bonus.sgzb.system.service.ISysUserService;
/**
* 角色信息
*
*
* @author ruoyi
*/
@RestController
@RequestMapping("/role")
public class SysRoleController extends BaseController
{
public class SysRoleController extends BaseController {
@Autowired
private ISysRoleService roleService;
@ -52,8 +51,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:list")
@GetMapping("/list")
public TableDataInfo list(SysRole role)
{
public TableDataInfo list(SysRole role) {
startPage();
List<SysRole> list = roleService.selectRoleList(role);
return getDataTable(list);
@ -62,8 +60,7 @@ public class SysRoleController extends BaseController
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:role:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysRole role)
{
public void export(HttpServletResponse response, SysRole role) {
List<SysRole> list;
list = roleService.selectRoleList(role);
//根据前端列表选中选择性列表导出
@ -80,8 +77,7 @@ public class SysRoleController extends BaseController
*/
@RequiresPermissions("system:role:query")
@GetMapping(value = "/{roleId}")
public AjaxResult getInfo(@PathVariable Long roleId)
{
public AjaxResult getInfo(@PathVariable Long roleId) {
roleService.checkRoleDataScope(roleId);
return success(roleService.selectRoleById(roleId));
}
@ -92,14 +88,10 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:add")
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysRole role)
{
if (!roleService.checkRoleNameUnique(role))
{
public AjaxResult add(@Validated @RequestBody SysRole role) {
if (!roleService.checkRoleNameUnique(role)) {
return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (!roleService.checkRoleKeyUnique(role))
{
} else if (!roleService.checkRoleKeyUnique(role)) {
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setCreateBy(SecurityUtils.getUsername());
@ -113,16 +105,12 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysRole role)
{
public AjaxResult edit(@Validated @RequestBody SysRole role) {
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
if (!roleService.checkRoleNameUnique(role))
{
if (!roleService.checkRoleNameUnique(role)) {
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (!roleService.checkRoleKeyUnique(role))
{
} else if (!roleService.checkRoleKeyUnique(role)) {
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setUpdateBy(SecurityUtils.getUsername());
@ -135,8 +123,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/dataScope")
public AjaxResult dataScope(@RequestBody SysRole role)
{
public AjaxResult dataScope(@RequestBody SysRole role) {
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
return toAjax(roleService.authDataScope(role));
@ -148,8 +135,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysRole role)
{
public AjaxResult changeStatus(@RequestBody SysRole role) {
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
role.setUpdateBy(SecurityUtils.getUsername());
@ -162,8 +148,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:remove")
@Log(title = "角色管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{roleIds}")
public AjaxResult remove(@PathVariable Long[] roleIds)
{
public AjaxResult remove(@PathVariable Long[] roleIds) {
return toAjax(roleService.deleteRoleByIds(roleIds));
}
@ -172,17 +157,16 @@ public class SysRoleController extends BaseController
*/
@RequiresPermissions("system:role:query")
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
public AjaxResult optionselect() {
return success(roleService.selectRoleAll());
}
/**
* 查询已分配用户角色列表
*/
@RequiresPermissions("system:role:list")
@GetMapping("/authUser/allocatedList")
public TableDataInfo allocatedList(SysUser user)
{
public TableDataInfo allocatedList(SysUser user) {
startPage();
List<SysUser> list = userService.selectAllocatedList(user);
return getDataTable(list);
@ -193,8 +177,7 @@ public class SysRoleController extends BaseController
*/
@RequiresPermissions("system:role:list")
@GetMapping("/authUser/unallocatedList")
public TableDataInfo unallocatedList(SysUser user)
{
public TableDataInfo unallocatedList(SysUser user) {
startPage();
List<SysUser> list = userService.selectUnallocatedList(user);
return getDataTable(list);
@ -206,8 +189,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PutMapping("/authUser/cancel")
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
{
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole) {
return toAjax(roleService.deleteAuthUser(userRole));
}
@ -217,8 +199,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PutMapping("/authUser/cancelAll")
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
{
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds) {
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
}
@ -228,8 +209,7 @@ public class SysRoleController extends BaseController
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PutMapping("/authUser/selectAll")
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
{
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds) {
roleService.checkRoleDataScope(roleId);
return toAjax(roleService.insertAuthUsers(roleId, userIds));
}
@ -239,8 +219,7 @@ public class SysRoleController extends BaseController
*/
@RequiresPermissions("system:role:query")
@GetMapping(value = "/deptTree/{roleId}")
public AjaxResult deptTree(@PathVariable("roleId") Long roleId)
{
public AjaxResult deptTree(@PathVariable("roleId") Long roleId) {
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
ajax.put("depts", deptService.selectDeptTreeList(new SysDept()));

View File

@ -106,7 +106,12 @@
<el-input v-model="form.linkMan" placeholder="请输入联系人" maxlength="20" />
</el-form-item>
<el-form-item label="联系电话" prop="telphone">
<el-input v-model="form.telphone" placeholder="请输入联系电话" maxlength="11" onkeyup="this.value = this.value.replace(/[^\d]/g,'');"/>
<el-input
v-model="form.telphone"
placeholder="请输入联系电话"
maxlength="11"
onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -303,13 +308,17 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const proIds = row.proId || this.ids;
this.$modal.confirm('是否确认删除所选择的数据项?').then(function() {
return delProject(proIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
const proIds = row.proId || this.ids
this.$modal
.confirm('是否确认删除所选择的数据项?')
.then(function () {
return delProject(proIds)
})
.then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {})
},
/** 导出按钮操作 */
handleExport() {

View File

@ -1,13 +1,6 @@
<template>
<div class="app-container" id="accessoryWarehousing">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
@ -29,13 +22,7 @@
></el-date-picker>
</el-form-item>
<el-form-item label="配件类型" prop="partId">
<el-select
v-model="queryParams.partId"
placeholder="请选择配件类型"
clearable
filterable
style="width: 240px"
>
<el-select v-model="queryParams.partId" placeholder="请选择配件类型" clearable filterable style="width: 240px">
<el-option
v-for="typeItem in typeList"
:key="typeItem.partId"
@ -110,45 +97,20 @@
code
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="采购单号" align="center" prop="code" />
<el-table-column
label="采购日期"
align="center"
prop="purchaseTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="到货日期"
align="center"
prop="arrivalTime"
:show-overflow-tooltip="true"
/>
<el-table-column label="采购日期" align="center" prop="purchaseTime" :show-overflow-tooltip="true" />
<el-table-column label="到货日期" align="center" prop="arrivalTime" :show-overflow-tooltip="true" />
<el-table-column
label="配件类型"
align="center"
prop="purchasingTypeName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="采购员"
align="center"
prop="purchaserName"
:show-overflow-tooltip="true"
/>
<el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" />
<el-table-column label="提交入库人员" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column
label="提交入库时间"
align="center"
prop="createTime"
:show-overflow-tooltip="true"
/>
<el-table-column label="提交入库时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column
label="状态"
align="center"
prop="taskStatusResult"
:show-overflow-tooltip="true"
/>
<el-table-column label="状态" align="center" prop="taskStatusResult" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" icon="el-icon-zoom-in" @click="handleView(scope.row)">查看</el-button>
@ -158,14 +120,18 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == 69"
>审核</el-button>
>
审核
</el-button>
<el-button
size="mini"
type="info"
icon="el-icon-edit"
v-if="scope.row.taskStatus == 70"
@click="handlePrint(scope.row)"
>入库单</el-button>
>
入库单
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -186,21 +152,8 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1000px"
append-to-body
:close-on-click-modal="false"
>
<el-form
:model="query"
ref="query"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
<el-form :model="query" ref="query" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="query.keyWord"
@ -293,25 +246,15 @@
<!-- >导出</el-button>-->
<!-- </el-col>-->
</el-row>
<el-table
v-loading="loading"
:data="detailTableList"
@selection-change="handleSelectionChange"
height="400"
>
<el-table v-loading="loading" :data="detailTableList" @selection-change="handleSelectionChange" height="400">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
<span>{{ (query.pageNum - 1) * 10 + scope.$index + 1 }}</span>
<span>{{ (query.pageNum - 1) * 10 + scope.$index + 1 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="配件类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
:show-overflow-tooltip="true"
/>
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="statusResult">
@ -330,18 +273,10 @@
width="150"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="pass(scope.row)"
v-if="scope.row.status == 1"
>通过</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status == 1"
@click="refused(scope.row)"
>不通过</el-button>
<el-button size="mini" type="text" @click="pass(scope.row)" v-if="scope.row.status == 1">通过</el-button>
<el-button size="mini" type="text" v-if="scope.row.status == 1" @click="refused(scope.row)">
不通过
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -366,16 +301,9 @@
<el-dialog :visible.sync="openPrint" width="900px" append-to-body>
<div style="height: 400px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div
class="title"
style="
text-align: center;
font-weight: 600;
font-size: 16px;
"
>入库单</div>
<div class="title" style="text-align: center; font-weight: 600; font-size: 16px">入库单</div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
<div
<!-- <div
class="item"
style="
width: 50%;
@ -385,19 +313,11 @@
"
>
<span>工程名称</span>
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
</div> -->
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>日期</span>
</div>
<div
<!-- <div
class="item"
style="
width: 50%;
@ -407,8 +327,8 @@
"
>
<span>领料单号</span>
</div>
<div
</div> -->
<!-- <div
class="item"
style="
width: 50%;
@ -418,16 +338,12 @@
"
>
<span>车辆信息</span>
</div>
</div> -->
</div>
<el-table
:data="printTableData"
class="table"
style="
margin-top: 20px;
padding-bottom: 1px;
padding-right: 1px;
"
style="margin-top: 20px; padding-bottom: 1px; padding-right: 1px"
border
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
@ -440,14 +356,7 @@
<!-- <el-table-column label="出库方式" align="center" prop="manageTypeName" /> -->
</el-table>
<div
class="fillIn"
style="
margin-top: 20px;
display: flex;
justify-content: space-between;
"
>
<div class="fillIn" style="margin-top: 20px; display: flex; justify-content: space-between">
<div class="item" style="width: 25%">
<span>审核</span>
</div>
@ -752,7 +661,7 @@ export default {
},
/** 提交按钮 */
submitForm: function() {
submitForm: function () {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {