Commit cc3d41c6 authored by 吴卿华's avatar 吴卿华

Merge remote-tracking branch 'origin/master'

parents 8a6ac2fd fcefa992
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TChangeApplyApproval;
import com.zehong.system.service.ITChangeApplyApprovalService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 变更申请审批验收Controller
*
* @author zehong
* @date 2023-02-14
*/
@RestController
@RequestMapping("/changeApply/approval")
public class TChangeApplyApprovalController extends BaseController
{
@Autowired
private ITChangeApplyApprovalService tChangeApplyApprovalService;
@Autowired
private TokenService tokenService;
/**
* 查询变更申请审批验收列表
*/
//@PreAuthorize("@ss.hasPermi('system:approval:list')")
@GetMapping("/list")
public TableDataInfo list(TChangeApplyApproval tChangeApplyApproval)
{
startPage();
List<TChangeApplyApproval> list = tChangeApplyApprovalService.selectTChangeApplyApprovalList(tChangeApplyApproval);
return getDataTable(list);
}
@GetMapping("/listApp")
public TableDataInfo listApp(TChangeApplyApproval tChangeApplyApproval)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
tChangeApplyApproval.setApprovalPerson(loginUser.getUser().getUserId());
startPage();
List<TChangeApplyApproval> list = tChangeApplyApprovalService.selectTChangeApplyApprovalListApp(tChangeApplyApproval);
return getDataTable(list);
}
/**
* 导出变更申请审批验收列表
*/
//@PreAuthorize("@ss.hasPermi('system:approval:export')")
@Log(title = "变更申请审批验收", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TChangeApplyApproval tChangeApplyApproval)
{
List<TChangeApplyApproval> list = tChangeApplyApprovalService.selectTChangeApplyApprovalList(tChangeApplyApproval);
ExcelUtil<TChangeApplyApproval> util = new ExcelUtil<TChangeApplyApproval>(TChangeApplyApproval.class);
return util.exportExcel(list, "变更申请审批验收数据");
}
/**
* 获取变更申请审批验收详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:approval:query')")
@GetMapping(value = "/{changeApplyId}")
public AjaxResult getInfo(@PathVariable("changeApplyId") Long changeApplyId)
{
return AjaxResult.success(tChangeApplyApprovalService.selectTChangeApplyApprovalById(changeApplyId));
}
/**
* 新增变更申请审批验收
*/
//@PreAuthorize("@ss.hasPermi('system:approval:add')")
@Log(title = "变更申请审批验收", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TChangeApplyApproval tChangeApplyApproval)
{
return toAjax(tChangeApplyApprovalService.insertTChangeApplyApproval(tChangeApplyApproval));
}
/**
* 修改变更申请审批验收
*/
//@PreAuthorize("@ss.hasPermi('system:approval:edit')")
@Log(title = "变更申请审批验收", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TChangeApplyApproval tChangeApplyApproval)
{
return toAjax(tChangeApplyApprovalService.updateTChangeApplyApproval(tChangeApplyApproval));
}
/**
* 删除变更申请审批验收
*/
//@PreAuthorize("@ss.hasPermi('system:approval:remove')")
@Log(title = "变更申请审批验收", businessType = BusinessType.DELETE)
@DeleteMapping("/{changeApplyIds}")
public AjaxResult remove(@PathVariable Long[] changeApplyIds)
{
return toAjax(tChangeApplyApprovalService.deleteTChangeApplyApprovalByIds(changeApplyIds));
}
}
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.system.service.ISysUserService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TChangeApplyApprover;
import com.zehong.system.service.ITChangeApplyApproverService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 变更申请审批人Controller
*
* @author zehong
* @date 2023-02-14
*/
@RestController
@RequestMapping("/changeApply/approver")
public class TChangeApplyApproverController extends BaseController
{
@Autowired
private ITChangeApplyApproverService tChangeApplyApproverService;
@Autowired
private ISysUserService userService;
/**
* 查询变更申请审批人列表
*/
//@PreAuthorize("@ss.hasPermi('system:approver:list')")
@GetMapping("/list")
public TableDataInfo list(TChangeApplyApprover tChangeApplyApprover)
{
startPage();
List<TChangeApplyApprover> list = tChangeApplyApproverService.selectTChangeApplyApproverList(tChangeApplyApprover);
for(TChangeApplyApprover applyApprover : list){
SysUser user = userService.selectUserById(applyApprover.getApprovalPerson());
applyApprover.setApprovalPersonName(user.getNickName());
}
return getDataTable(list);
}
/**
* 导出变更申请审批人列表
*/
//@PreAuthorize("@ss.hasPermi('system:approver:export')")
@Log(title = "变更申请审批人", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TChangeApplyApprover tChangeApplyApprover)
{
List<TChangeApplyApprover> list = tChangeApplyApproverService.selectTChangeApplyApproverList(tChangeApplyApprover);
ExcelUtil<TChangeApplyApprover> util = new ExcelUtil<TChangeApplyApprover>(TChangeApplyApprover.class);
return util.exportExcel(list, "变更申请审批人数据");
}
/**
* 获取变更申请审批人详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:approver:query')")
@GetMapping(value = "/{changeApplyApproverId}")
public AjaxResult getInfo(@PathVariable("changeApplyApproverId") Long changeApplyApproverId)
{
return AjaxResult.success(tChangeApplyApproverService.selectTChangeApplyApproverById(changeApplyApproverId));
}
/**
* 新增变更申请审批人
*/
//@PreAuthorize("@ss.hasPermi('system:approver:add')")
@Log(title = "变更申请审批人", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TChangeApplyApprover tChangeApplyApprover)
{
return toAjax(tChangeApplyApproverService.insertTChangeApplyApprover(tChangeApplyApprover));
}
/**
* 修改变更申请审批人
*/
//@PreAuthorize("@ss.hasPermi('system:approver:edit')")
@Log(title = "变更申请审批人", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TChangeApplyApprover tChangeApplyApprover)
{
return toAjax(tChangeApplyApproverService.updateTChangeApplyApprover(tChangeApplyApprover));
}
/**
* 删除变更申请审批人
*/
//@PreAuthorize("@ss.hasPermi('system:approver:remove')")
@Log(title = "变更申请审批人", businessType = BusinessType.DELETE)
@DeleteMapping("/{changeApplyApproverIds}")
public AjaxResult remove(@PathVariable Long[] changeApplyApproverIds)
{
return toAjax(tChangeApplyApproverService.deleteTChangeApplyApproverByIds(changeApplyApproverIds));
}
/**
* 批量新增审核人
* @param tChangeApplyApproverList 审核人
* @return
*/
@PostMapping("/batchAdd")
public AjaxResult batchAdd(@RequestBody List<TChangeApplyApprover> tChangeApplyApproverList)
{
return toAjax(tChangeApplyApproverService.batchInsertTChangeApplyApprover(tChangeApplyApproverList));
}
}
......@@ -23,7 +23,7 @@ import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 特种设备台账Controller
* 特种设备台账记录Controller
*
* @author zehong
* @date 2022-07-02
......@@ -36,31 +36,31 @@ public class TSpecialDeviceRecordController extends BaseController
private ITSpecialDeviceRecordService tSpecialDeviceRecordService;
/**
* 查询特种设备台账列表
* 查询特种设备台账记录列表
*/
//@PreAuthorize("@ss.hasPermi('deviceManagement:specialDeviceRecord:list')")
@GetMapping("/list")
public TableDataInfo list(TSpecialDeviceRecord tSpecialDeviceRecord)
public TableDataInfo list(TSpecialDeviceRecordVo tSpecialDeviceRecordVo)
{
startPage();
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecordVo);
return getDataTable(list);
}
/**
* 导出特种设备台账列表
* 导出特种设备台账记录列表
*/
@Log(title = "特种设备台账", businessType = BusinessType.EXPORT)
@Log(title = "特种设备台账记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSpecialDeviceRecord tSpecialDeviceRecord)
public AjaxResult export(TSpecialDeviceRecordVo tSpecialDeviceRecordVo)
{
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecordVo);
ExcelUtil<TSpecialDeviceRecordVo> util = new ExcelUtil<TSpecialDeviceRecordVo>(TSpecialDeviceRecordVo.class);
return util.exportExcel(list, "特种设备台账数据");
return util.exportExcel(list, "特种设备台账记录数据");
}
/**
* 获取特种设备台账详细信息
* 获取特种设备台账记录详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
......@@ -69,9 +69,9 @@ public class TSpecialDeviceRecordController extends BaseController
}
/**
* 新增特种设备台账
* 新增特种设备台账记录
*/
@Log(title = "特种设备台账", businessType = BusinessType.INSERT)
@Log(title = "特种设备台账记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSpecialDeviceRecord tSpecialDeviceRecord)
{
......@@ -79,9 +79,9 @@ public class TSpecialDeviceRecordController extends BaseController
}
/**
* 修改特种设备台账
* 修改特种设备台账记录
*/
@Log(title = "特种设备台账", businessType = BusinessType.UPDATE)
@Log(title = "特种设备台账记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSpecialDeviceRecord tSpecialDeviceRecord)
{
......@@ -89,9 +89,9 @@ public class TSpecialDeviceRecordController extends BaseController
}
/**
* 删除特种设备台账
* 删除特种设备台账记录
*/
@Log(title = "特种设备台账", businessType = BusinessType.DELETE)
@Log(title = "特种设备台账记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
......
......@@ -63,6 +63,13 @@ public class TStaffController extends BaseController
return getDataTable(list);
}
@GetMapping("/allList")
public TableDataInfo allList(TStaffForm tStaff)
{
startPage();
List<TStaffVo> list = tStaffService.allList(tStaff);
return getDataTable(list);
}
/**
* 无分页查询
* @param tStaff
......
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 变更申请审批验收对象 t_change_apply_approval
*
* @author zehong
* @date 2023-02-14
*/
public class TChangeApplyApproval extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 变更申请id */
private Long changeApplyId;
/** 变更单位 */
@Excel(name = "变更单位")
private String changeUnit;
/** 变更项目名称 */
@Excel(name = "变更项目名称")
private String changeProjectName;
/** 申请表数据 */
@Excel(name = "申请表数据")
private String tableData;
/** 录入人 */
@Excel(name = "录入人")
private Long enterPerson;
/** 录入时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date enterTime;
/** 培训资料 */
@Excel(name = "培训资料")
private String trainMaterial;
/** 审批状态:0.待录入审批人 1.待审批 2.待上传培训资料 3.已完成 */
@Excel(name = "审批状态:0.待录入审批人 1.待审批 2.待上传培训资料 3.已完成")
private String changeApplyStatus;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
private Date enterTimeBegin;
private Date enterTimeEnd;
private Long approvalPerson;
private String approvalSign;
public String getApprovalSign() {
return approvalSign;
}
public void setApprovalSign(String approvalSign) {
this.approvalSign = approvalSign;
}
public Long getApprovalPerson() {
return approvalPerson;
}
public void setApprovalPerson(Long approvalPerson) {
this.approvalPerson = approvalPerson;
}
public void setChangeApplyId(Long changeApplyId)
{
this.changeApplyId = changeApplyId;
}
public Long getChangeApplyId()
{
return changeApplyId;
}
public void setChangeUnit(String changeUnit)
{
this.changeUnit = changeUnit;
}
public String getChangeUnit()
{
return changeUnit;
}
public void setChangeProjectName(String changeProjectName)
{
this.changeProjectName = changeProjectName;
}
public String getChangeProjectName()
{
return changeProjectName;
}
public void setTableData(String tableData)
{
this.tableData = tableData;
}
public String getTableData()
{
return tableData;
}
public void setEnterPerson(Long enterPerson)
{
this.enterPerson = enterPerson;
}
public Long getEnterPerson()
{
return enterPerson;
}
public void setEnterTime(Date enterTime)
{
this.enterTime = enterTime;
}
public Date getEnterTime()
{
return enterTime;
}
public void setTrainMaterial(String trainMaterial)
{
this.trainMaterial = trainMaterial;
}
public String getTrainMaterial()
{
return trainMaterial;
}
public void setChangeApplyStatus(String changeApplyStatus)
{
this.changeApplyStatus = changeApplyStatus;
}
public String getChangeApplyStatus()
{
return changeApplyStatus;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public Date getEnterTimeBegin() {
return enterTimeBegin;
}
public void setEnterTimeBegin(Date enterTimeBegin) {
this.enterTimeBegin = enterTimeBegin;
}
public Date getEnterTimeEnd() {
return enterTimeEnd;
}
public void setEnterTimeEnd(Date enterTimeEnd) {
this.enterTimeEnd = enterTimeEnd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("changeApplyId", getChangeApplyId())
.append("changeUnit", getChangeUnit())
.append("changeProjectName", getChangeProjectName())
.append("tableData", getTableData())
.append("enterPerson", getEnterPerson())
.append("enterTime", getEnterTime())
.append("trainMaterial", getTrainMaterial())
.append("changeApplyStatus", getChangeApplyStatus())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
}
}
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 变更申请审批人对象 t_change_apply_approver
*
* @author zehong
* @date 2023-02-14
*/
public class TChangeApplyApprover extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 申请审批人id */
private Long changeApplyApproverId;
/** 变更申请id */
@Excel(name = "变更申请id")
private Long changeApplyId;
/** 审批人id */
@Excel(name = "审批人id")
private Long approvalPerson;
/** 审批人签名 */
@Excel(name = "审批人签名")
private String approvalSign;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
private String approvalPersonName;
public void setChangeApplyApproverId(Long changeApplyApproverId)
{
this.changeApplyApproverId = changeApplyApproverId;
}
public Long getChangeApplyApproverId()
{
return changeApplyApproverId;
}
public void setChangeApplyId(Long changeApplyId)
{
this.changeApplyId = changeApplyId;
}
public Long getChangeApplyId()
{
return changeApplyId;
}
public void setApprovalPerson(Long approvalPerson)
{
this.approvalPerson = approvalPerson;
}
public Long getApprovalPerson()
{
return approvalPerson;
}
public void setApprovalSign(String approvalSign)
{
this.approvalSign = approvalSign;
}
public String getApprovalSign()
{
return approvalSign;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public String getApprovalPersonName() {
return approvalPersonName;
}
public void setApprovalPersonName(String approvalPersonName) {
this.approvalPersonName = approvalPersonName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("changeApplyApproverId", getChangeApplyApproverId())
.append("changeApplyId", getChangeApplyId())
.append("approvalPerson", getApprovalPerson())
.append("approvalSign", getApprovalSign())
.append("isDel", getIsDel())
.append("remark", getRemark())
.toString();
}
}
......@@ -28,8 +28,8 @@ public class TSpecialDeviceRecord extends BaseEntity
private String operateType;
/** 设备位号 */
@Excel(name = "设备位号")
private String tagNumber;
// @Excel(name = "设备位号")
// private String tagNumber;
/** 设备id */
private Long deviceId;
......@@ -70,13 +70,13 @@ public class TSpecialDeviceRecord extends BaseEntity
this.operateType = operateType;
}
public String getTagNumber() {
return tagNumber;
}
public void setTagNumber(String tagNumber) {
this.tagNumber = tagNumber;
}
// public String getTagNumber() {
// return tagNumber;
// }
//
// public void setTagNumber(String tagNumber) {
// this.tagNumber = tagNumber;
// }
public Long getDeviceId() {
return deviceId;
......
......@@ -32,10 +32,10 @@ public class TSpecialDeviceRecordVo extends BaseEntity
/** 对应类型 */
private String operateType;
/** 设备编号 */
private String deviceCode;
/** 设备id */
private Long deviceId;
/** 设备编号 */
/** 设备名称 */
private String deviceName;
/** 设备编号 */
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TChangeApplyApproval;
/**
* 变更申请审批验收Mapper接口
*
* @author zehong
* @date 2023-02-14
*/
public interface TChangeApplyApprovalMapper
{
/**
* 查询变更申请审批验收
*
* @param changeApplyId 变更申请审批验收ID
* @return 变更申请审批验收
*/
public TChangeApplyApproval selectTChangeApplyApprovalById(Long changeApplyId);
/**
* 查询变更申请审批验收列表
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 变更申请审批验收集合
*/
public List<TChangeApplyApproval> selectTChangeApplyApprovalList(TChangeApplyApproval tChangeApplyApproval);
public List<TChangeApplyApproval> selectTChangeApplyApprovalListApp(TChangeApplyApproval tChangeApplyApproval);
/**
* 新增变更申请审批验收
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 结果
*/
public int insertTChangeApplyApproval(TChangeApplyApproval tChangeApplyApproval);
/**
* 修改变更申请审批验收
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 结果
*/
public int updateTChangeApplyApproval(TChangeApplyApproval tChangeApplyApproval);
/**
* 删除变更申请审批验收
*
* @param changeApplyId 变更申请审批验收ID
* @return 结果
*/
public int deleteTChangeApplyApprovalById(Long changeApplyId);
/**
* 批量删除变更申请审批验收
*
* @param changeApplyIds 需要删除的数据ID
* @return 结果
*/
public int deleteTChangeApplyApprovalByIds(Long[] changeApplyIds);
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TChangeApplyApprover;
import java.util.List;
/**
* 变更申请审批人Mapper接口
*
* @author zehong
* @date 2023-02-14
*/
public interface TChangeApplyApproverMapper
{
/**
* 查询变更申请审批人
*
* @param changeApplyApproverId 变更申请审批人ID
* @return 变更申请审批人
*/
public TChangeApplyApprover selectTChangeApplyApproverById(Long changeApplyApproverId);
/**
* 查询变更申请审批人列表
*
* @param tChangeApplyApprover 变更申请审批人
* @return 变更申请审批人集合
*/
public List<TChangeApplyApprover> selectTChangeApplyApproverList(TChangeApplyApprover tChangeApplyApprover);
/**
* 新增变更申请审批人
*
* @param tChangeApplyApprover 变更申请审批人
* @return 结果
*/
public int insertTChangeApplyApprover(TChangeApplyApprover tChangeApplyApprover);
/**
* 修改变更申请审批人
*
* @param tChangeApplyApprover 变更申请审批人
* @return 结果
*/
public int updateTChangeApplyApprover(TChangeApplyApprover tChangeApplyApprover);
/**
* 删除变更申请审批人
*
* @param changeApplyApproverId 变更申请审批人ID
* @return 结果
*/
public int deleteTChangeApplyApproverById(Long changeApplyApproverId);
/**
* 批量删除变更申请审批人
*
* @param changeApplyApproverIds 需要删除的数据ID
* @return 结果
*/
public int deleteTChangeApplyApproverByIds(Long[] changeApplyApproverIds);
/**
* 批量新增审批人
* @param changeApplyApproverList 审批人
* @return
*/
int batchInsertTChangeApplyApprover(List<TChangeApplyApprover> changeApplyApproverList);
List<TChangeApplyApprover> selectSignList(Long changeApplyId);
}
......@@ -23,10 +23,10 @@ public interface TSpecialDeviceRecordMapper
/**
* 查询特种设备台账列表
*
* @param tSpecialDeviceRecord 特种设备台账
* @param tSpecialDeviceRecordVo 特种设备台账
* @return 特种设备台账集合
*/
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecord tSpecialDeviceRecord);
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecordVo tSpecialDeviceRecordVo);
/**
* 新增特种设备台账
......
......@@ -35,6 +35,8 @@ public interface TStaffMapper
* @return 员工信息管理集合
*/
public List<TStaffVo> selectTStaffList(TStaffForm tStaff);
public List<TStaffVo> allList(TStaffForm tStaff);
/**
* 新增员工信息管理
......
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TChangeApplyApproval;
/**
* 变更申请审批验收Service接口
*
* @author zehong
* @date 2023-02-14
*/
public interface ITChangeApplyApprovalService
{
/**
* 查询变更申请审批验收
*
* @param changeApplyId 变更申请审批验收ID
* @return 变更申请审批验收
*/
public TChangeApplyApproval selectTChangeApplyApprovalById(Long changeApplyId);
/**
* 查询变更申请审批验收列表
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 变更申请审批验收集合
*/
public List<TChangeApplyApproval> selectTChangeApplyApprovalList(TChangeApplyApproval tChangeApplyApproval);
public List<TChangeApplyApproval> selectTChangeApplyApprovalListApp(TChangeApplyApproval tChangeApplyApproval);
/**
* 新增变更申请审批验收
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 结果
*/
public int insertTChangeApplyApproval(TChangeApplyApproval tChangeApplyApproval);
/**
* 修改变更申请审批验收
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 结果
*/
public int updateTChangeApplyApproval(TChangeApplyApproval tChangeApplyApproval);
/**
* 批量删除变更申请审批验收
*
* @param changeApplyIds 需要删除的变更申请审批验收ID
* @return 结果
*/
public int deleteTChangeApplyApprovalByIds(Long[] changeApplyIds);
/**
* 删除变更申请审批验收信息
*
* @param changeApplyId 变更申请审批验收ID
* @return 结果
*/
public int deleteTChangeApplyApprovalById(Long changeApplyId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TChangeApplyApprover;
/**
* 变更申请审批人Service接口
*
* @author zehong
* @date 2023-02-14
*/
public interface ITChangeApplyApproverService
{
/**
* 查询变更申请审批人
*
* @param changeApplyApproverId 变更申请审批人ID
* @return 变更申请审批人
*/
public TChangeApplyApprover selectTChangeApplyApproverById(Long changeApplyApproverId);
/**
* 查询变更申请审批人列表
*
* @param tChangeApplyApprover 变更申请审批人
* @return 变更申请审批人集合
*/
public List<TChangeApplyApprover> selectTChangeApplyApproverList(TChangeApplyApprover tChangeApplyApprover);
/**
* 新增变更申请审批人
*
* @param tChangeApplyApprover 变更申请审批人
* @return 结果
*/
public int insertTChangeApplyApprover(TChangeApplyApprover tChangeApplyApprover);
/**
* 修改变更申请审批人
*
* @param tChangeApplyApprover 变更申请审批人
* @return 结果
*/
public int updateTChangeApplyApprover(TChangeApplyApprover tChangeApplyApprover);
/**
* 批量删除变更申请审批人
*
* @param changeApplyApproverIds 需要删除的变更申请审批人ID
* @return 结果
*/
public int deleteTChangeApplyApproverByIds(Long[] changeApplyApproverIds);
/**
* 删除变更申请审批人信息
*
* @param changeApplyApproverId 变更申请审批人ID
* @return 结果
*/
public int deleteTChangeApplyApproverById(Long changeApplyApproverId);
/**
* 批量新增审批人
* @param changeApplyApproverList 审批人
* @return
*/
int batchInsertTChangeApplyApprover(List<TChangeApplyApprover> changeApplyApproverList);
}
......@@ -23,10 +23,10 @@ public interface ITSpecialDeviceRecordService
/**
* 查询特种设备台账列表
*
* @param tSpecialDeviceRecord 特种设备台账
* @param tSpecialDeviceRecordVo 特种设备台账
* @return 特种设备台账集合
*/
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecord tSpecialDeviceRecord);
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecordVo tSpecialDeviceRecordVo);
/**
* 新增特种设备台账
......
......@@ -28,6 +28,8 @@ public interface ITStaffService
* @return 员工信息管理集合
*/
public List<TStaffVo> selectTStaffList(TStaffForm tStaff);
public List<TStaffVo> allList(TStaffForm tStaff);
/**
* 新增员工信息管理
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.zehong.system.domain.TChangeApplyApprover;
import com.zehong.system.mapper.TChangeApplyApproverMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TChangeApplyApprovalMapper;
import com.zehong.system.domain.TChangeApplyApproval;
import com.zehong.system.service.ITChangeApplyApprovalService;
/**
* 变更申请审批验收Service业务层处理
*
* @author zehong
* @date 2023-02-14
*/
@Service
public class TChangeApplyApprovalServiceImpl implements ITChangeApplyApprovalService
{
@Autowired
private TChangeApplyApprovalMapper tChangeApplyApprovalMapper;
@Autowired
private TChangeApplyApproverMapper tChangeApplyApproverMapper;
/**
* 查询变更申请审批验收
*
* @param changeApplyId 变更申请审批验收ID
* @return 变更申请审批验收
*/
@Override
public TChangeApplyApproval selectTChangeApplyApprovalById(Long changeApplyId)
{
return tChangeApplyApprovalMapper.selectTChangeApplyApprovalById(changeApplyId);
}
/**
* 查询变更申请审批验收列表
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 变更申请审批验收
*/
@Override
public List<TChangeApplyApproval> selectTChangeApplyApprovalList(TChangeApplyApproval tChangeApplyApproval)
{
return tChangeApplyApprovalMapper.selectTChangeApplyApprovalList(tChangeApplyApproval);
}
/**
* app设备变更列表
* @param tChangeApplyApproval
* @return
*/
@Override
public List<TChangeApplyApproval> selectTChangeApplyApprovalListApp(TChangeApplyApproval tChangeApplyApproval)
{
return tChangeApplyApprovalMapper.selectTChangeApplyApprovalListApp(tChangeApplyApproval);
}
/**
* 新增变更申请审批验收
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 结果
*/
@Override
public int insertTChangeApplyApproval(TChangeApplyApproval tChangeApplyApproval)
{
return tChangeApplyApprovalMapper.insertTChangeApplyApproval(tChangeApplyApproval);
}
/**
* 修改变更申请审批验收
*
* @param tChangeApplyApproval 变更申请审批验收
* @return 结果
*/
@Override
public int updateTChangeApplyApproval(TChangeApplyApproval tChangeApplyApproval)
{
return tChangeApplyApprovalMapper.updateTChangeApplyApproval(tChangeApplyApproval);
}
/**
* 批量删除变更申请审批验收
*
* @param changeApplyIds 需要删除的变更申请审批验收ID
* @return 结果
*/
@Override
public int deleteTChangeApplyApprovalByIds(Long[] changeApplyIds)
{
for(Long changeApplyId : changeApplyIds){
TChangeApplyApprover applyApprover = new TChangeApplyApprover();
applyApprover.setChangeApplyId(changeApplyId);
List<TChangeApplyApprover> applyApproverList = tChangeApplyApproverMapper.selectTChangeApplyApproverList(applyApprover);
if(null!=applyApproverList && applyApproverList.size() > 0){
List<Long> changeApplyApproverIds = new ArrayList<>();
for(TChangeApplyApprover applyApprover1 : applyApproverList){
changeApplyApproverIds.add(applyApprover1.getChangeApplyApproverId());
}
tChangeApplyApproverMapper.deleteTChangeApplyApproverByIds(changeApplyApproverIds.toArray(new Long[changeApplyApproverIds.size()]));
}
}
return tChangeApplyApprovalMapper.deleteTChangeApplyApprovalByIds(changeApplyIds);
}
/**
* 删除变更申请审批验收信息
*
* @param changeApplyId 变更申请审批验收ID
* @return 结果
*/
@Override
public int deleteTChangeApplyApprovalById(Long changeApplyId)
{
return tChangeApplyApprovalMapper.deleteTChangeApplyApprovalById(changeApplyId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.system.domain.TChangeApplyApproval;
import com.zehong.system.mapper.TChangeApplyApprovalMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TChangeApplyApproverMapper;
import com.zehong.system.domain.TChangeApplyApprover;
import com.zehong.system.service.ITChangeApplyApproverService;
import org.springframework.transaction.annotation.Transactional;
/**
* 变更申请审批人Service业务层处理
*
* @author zehong
* @date 2023-02-14
*/
@Service
public class TChangeApplyApproverServiceImpl implements ITChangeApplyApproverService
{
@Autowired
private TChangeApplyApproverMapper tChangeApplyApproverMapper;
@Autowired
private TChangeApplyApprovalMapper tChangeApplyApprovalMapper;
/**
* 查询变更申请审批人
*
* @param changeApplyApproverId 变更申请审批人ID
* @return 变更申请审批人
*/
@Override
public TChangeApplyApprover selectTChangeApplyApproverById(Long changeApplyApproverId)
{
return tChangeApplyApproverMapper.selectTChangeApplyApproverById(changeApplyApproverId);
}
/**
* 查询变更申请审批人列表
*
* @param tChangeApplyApprover 变更申请审批人
* @return 变更申请审批人
*/
@Override
public List<TChangeApplyApprover> selectTChangeApplyApproverList(TChangeApplyApprover tChangeApplyApprover)
{
return tChangeApplyApproverMapper.selectTChangeApplyApproverList(tChangeApplyApprover);
}
/**
* 新增变更申请审批人
*
* @param tChangeApplyApprover 变更申请审批人
* @return 结果
*/
@Override
public int insertTChangeApplyApprover(TChangeApplyApprover tChangeApplyApprover)
{
return tChangeApplyApproverMapper.insertTChangeApplyApprover(tChangeApplyApprover);
}
/**
* 修改变更申请审批人
*
* @param tChangeApplyApprover 变更申请审批人
* @return 结果
*/
@Override
public int updateTChangeApplyApprover(TChangeApplyApprover tChangeApplyApprover)
{
int a = tChangeApplyApproverMapper.updateTChangeApplyApprover(tChangeApplyApprover);
List<TChangeApplyApprover> list = tChangeApplyApproverMapper.selectSignList(tChangeApplyApprover.getApprovalPerson());
if(list.size()==0){
TChangeApplyApproval approval = tChangeApplyApprovalMapper.selectTChangeApplyApprovalById(tChangeApplyApprover.getChangeApplyId());
if(approval.getChangeApplyStatus().equals("1")){
approval.setChangeApplyStatus("2");
tChangeApplyApprovalMapper.updateTChangeApplyApproval(approval);
}
}
return a;
}
/**
* 批量删除变更申请审批人
*
* @param changeApplyApproverIds 需要删除的变更申请审批人ID
* @return 结果
*/
@Override
public int deleteTChangeApplyApproverByIds(Long[] changeApplyApproverIds)
{
return tChangeApplyApproverMapper.deleteTChangeApplyApproverByIds(changeApplyApproverIds);
}
/**
* 删除变更申请审批人信息
*
* @param changeApplyApproverId 变更申请审批人ID
* @return 结果
*/
@Override
public int deleteTChangeApplyApproverById(Long changeApplyApproverId)
{
return tChangeApplyApproverMapper.deleteTChangeApplyApproverById(changeApplyApproverId);
}
/**
* 批量新增审批人
* @param changeApplyApproverList 审批人
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int batchInsertTChangeApplyApprover(List<TChangeApplyApprover> changeApplyApproverList){
TChangeApplyApproval applyApproval = new TChangeApplyApproval();
applyApproval.setChangeApplyId(changeApplyApproverList.get(0).getChangeApplyId());
applyApproval.setChangeApplyStatus("1");
tChangeApplyApprovalMapper.updateTChangeApplyApproval(applyApproval);
return tChangeApplyApproverMapper.batchInsertTChangeApplyApprover(changeApplyApproverList);
}
}
......@@ -169,7 +169,7 @@ public class TEntranceGuardPersonInfoServiceImpl implements ITEntranceGuardPerso
contents[i+2]=tEntranceGuardPersonInfo.getPersonName()+""+crc+""+DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,tEntranceGuardPersonInfo.getActionTime());
i++;
}
contents[5]=" "+DateUtils.getDate();//展示当日日期
contents[5]=" "+DateUtils.getDate();//展示当日日期
//执行发送
send(contents);
......
......@@ -68,7 +68,6 @@ public class TMaintainPlanServiceImpl implements ITMaintainPlanService
TDeviceInfo tDeviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(Long.valueOf(id));
TSpecialDeviceRecord tSpecialDeviceRecord = new TSpecialDeviceRecord();
tSpecialDeviceRecord.setTagNumber(tDeviceInfo.getTagNumber());
tSpecialDeviceRecord.setDeviceId(tDeviceInfo.getId());
tSpecialDeviceRecord.setOperateCode(planCode);
tSpecialDeviceRecord.setOperateType("1");
......
......@@ -66,7 +66,6 @@ public class TRepairOrderServiceImpl implements ITRepairOrderService
TDeviceInfo tDeviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(tRepairOrder.getDeviceId());
TSpecialDeviceRecord tSpecialDeviceRecord = new TSpecialDeviceRecord();
tSpecialDeviceRecord.setTagNumber(tDeviceInfo.getTagNumber());
tSpecialDeviceRecord.setDeviceId(tDeviceInfo.getId());
tSpecialDeviceRecord.setOperateCode(repairCode);
tSpecialDeviceRecord.setOperateType("2");
......
......@@ -36,13 +36,13 @@ public class TSpecialDeviceRecordServiceImpl implements ITSpecialDeviceRecordSer
/**
* 查询特种设备台账列表
*
* @param tSpecialDeviceRecord 特种设备台账
* @param tSpecialDeviceRecordVo 特种设备台账
* @return 特种设备台账
*/
@Override
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecord tSpecialDeviceRecord)
public List<TSpecialDeviceRecordVo> selectTSpecialDeviceRecordList(TSpecialDeviceRecordVo tSpecialDeviceRecordVo)
{
return tSpecialDeviceRecordMapper.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
return tSpecialDeviceRecordMapper.selectTSpecialDeviceRecordList(tSpecialDeviceRecordVo);
}
/**
......
......@@ -55,6 +55,11 @@ public class TStaffServiceImpl implements ITStaffService
{
return tStaffMapper.selectTStaffList(tStaff);
}
@Override
public List<TStaffVo> allList(TStaffForm tStaff)
{
return tStaffMapper.allList(tStaff);
}
/**
* 新增员工信息管理
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TChangeApplyApprovalMapper">
<resultMap type="TChangeApplyApproval" id="TChangeApplyApprovalResult">
<result property="changeApplyId" column="change_apply_id" />
<result property="changeUnit" column="change_unit" />
<result property="changeProjectName" column="change_project_name" />
<result property="tableData" column="table_data" />
<result property="enterPerson" column="enter_person" />
<result property="enterTime" column="enter_time" />
<result property="trainMaterial" column="train_material" />
<result property="changeApplyStatus" column="change_apply_status" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
<result property="approvalPerson" column="approvalPerson" />
<result property="approvalSign" column="approvalSign"/>
</resultMap>
<sql id="selectTChangeApplyApprovalVo">
select change_apply_id, change_unit, change_project_name, table_data, enter_person, enter_time, train_material, change_apply_status, is_del, remark from t_change_apply_approval
</sql>
<select id="selectTChangeApplyApprovalList" parameterType="TChangeApplyApproval" resultMap="TChangeApplyApprovalResult">
<include refid="selectTChangeApplyApprovalVo"/>
<where>
<if test="changeUnit != null and changeUnit != ''"> and change_unit = #{changeUnit}</if>
<if test="changeProjectName != null and changeProjectName != ''"> and change_project_name like concat('%', #{changeProjectName}, '%')</if>
<if test="tableData != null and tableData != ''"> and table_data = #{tableData}</if>
<if test="enterPerson != null "> and enter_person = #{enterPerson}</if>
<if test="enterTimeBegin != null and enterTimeEnd != null "> and enter_time BETWEEN #{enterTimeBegin} AND #{enterTimeEnd}</if>
<if test="trainMaterial != null and trainMaterial != ''"> and train_material = #{trainMaterial}</if>
<if test="changeApplyStatus != null and changeApplyStatus != ''"> and change_apply_status = #{changeApplyStatus}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
ORDER BY enter_time DESC
</select>
<select id="selectTChangeApplyApprovalListApp" parameterType="TChangeApplyApproval" resultMap="TChangeApplyApprovalResult">
SELECT a.*,r.approval_sign as approvalSign FROM t_change_apply_approver r
LEFT JOIN t_change_apply_approval a ON a.`change_apply_id` = r.`change_apply_id`
<where>
<if test="changeUnit != null and changeUnit != ''"> and a.change_unit = #{changeUnit}</if>
<if test="changeProjectName != null and changeProjectName != ''"> and a.change_project_name like concat('%', #{changeProjectName}, '%')</if>
<if test="tableData != null and tableData != ''"> and a.table_data = #{tableData}</if>
<if test="enterPerson != null "> and enter_person = #{enterPerson}</if>
<if test="enterTimeBegin != null and enterTimeEnd != null "> and a.enter_time BETWEEN #{enterTimeBegin} AND #{enterTimeEnd}</if>
<if test="trainMaterial != null and trainMaterial != ''"> and a.train_material = #{trainMaterial}</if>
<if test="changeApplyStatus != null and changeApplyStatus != ''"> and a.change_apply_status = #{changeApplyStatus}</if>
<if test="isDel != null and isDel != ''"> and a.is_del = #{isDel}</if>
<if test="approvalPerson != null"> and r.approval_person = #{approvalPerson}</if>
</where>
ORDER BY enter_time DESC
</select>
<select id="selectTChangeApplyApprovalById" parameterType="Long" resultMap="TChangeApplyApprovalResult">
<include refid="selectTChangeApplyApprovalVo"/>
where change_apply_id = #{changeApplyId}
</select>
<insert id="insertTChangeApplyApproval" parameterType="TChangeApplyApproval" useGeneratedKeys="true" keyProperty="changeApplyId">
insert into t_change_apply_approval
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="changeUnit != null">change_unit,</if>
<if test="changeProjectName != null">change_project_name,</if>
<if test="tableData != null">table_data,</if>
<if test="enterPerson != null">enter_person,</if>
<if test="enterTime != null">enter_time,</if>
<if test="trainMaterial != null">train_material,</if>
<if test="changeApplyStatus != null">change_apply_status,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="changeUnit != null">#{changeUnit},</if>
<if test="changeProjectName != null">#{changeProjectName},</if>
<if test="tableData != null">#{tableData},</if>
<if test="enterPerson != null">#{enterPerson},</if>
<if test="enterTime != null">#{enterTime},</if>
<if test="trainMaterial != null">#{trainMaterial},</if>
<if test="changeApplyStatus != null">#{changeApplyStatus},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTChangeApplyApproval" parameterType="TChangeApplyApproval">
update t_change_apply_approval
<trim prefix="SET" suffixOverrides=",">
<if test="changeUnit != null">change_unit = #{changeUnit},</if>
<if test="changeProjectName != null">change_project_name = #{changeProjectName},</if>
<if test="tableData != null">table_data = #{tableData},</if>
<if test="enterPerson != null">enter_person = #{enterPerson},</if>
<if test="enterTime != null">enter_time = #{enterTime},</if>
<if test="trainMaterial != null">train_material = #{trainMaterial},</if>
<if test="changeApplyStatus != null">change_apply_status = #{changeApplyStatus},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where change_apply_id = #{changeApplyId}
</update>
<delete id="deleteTChangeApplyApprovalById" parameterType="Long">
delete from t_change_apply_approval where change_apply_id = #{changeApplyId}
</delete>
<delete id="deleteTChangeApplyApprovalByIds" parameterType="String">
delete from t_change_apply_approval where change_apply_id in
<foreach item="changeApplyId" collection="array" open="(" separator="," close=")">
#{changeApplyId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TChangeApplyApproverMapper">
<resultMap type="TChangeApplyApprover" id="TChangeApplyApproverResult">
<result property="changeApplyApproverId" column="change_apply_approver_id" />
<result property="changeApplyId" column="change_apply_id" />
<result property="approvalPerson" column="approval_person" />
<result property="approvalSign" column="approval_sign" />
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectTChangeApplyApproverVo">
select change_apply_approver_id, change_apply_id, approval_person, approval_sign, is_del, remark from t_change_apply_approver
</sql>
<select id="selectTChangeApplyApproverList" parameterType="TChangeApplyApprover" resultMap="TChangeApplyApproverResult">
<include refid="selectTChangeApplyApproverVo"/>
<where>
<if test="changeApplyId != null "> and change_apply_id = #{changeApplyId}</if>
<if test="approvalPerson != null "> and approval_person = #{approvalPerson}</if>
<if test="approvalSign != null and approvalSign != ''"> and approval_sign = #{approvalSign}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectTChangeApplyApproverById" parameterType="Long" resultMap="TChangeApplyApproverResult">
<include refid="selectTChangeApplyApproverVo"/>
where change_apply_approver_id = #{changeApplyApproverId}
</select>
<select id="selectSignList" parameterType="Long" resultMap="TChangeApplyApproverResult">
<include refid="selectTChangeApplyApproverVo"/>
where change_apply_id = #{changeApplyId}
</select>
<insert id="insertTChangeApplyApprover" parameterType="TChangeApplyApprover" useGeneratedKeys="true" keyProperty="changeApplyApproverId">
insert into t_change_apply_approver
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="changeApplyId != null">change_apply_id,</if>
<if test="approvalPerson != null">approval_person,</if>
<if test="approvalSign != null">approval_sign,</if>
<if test="isDel != null">is_del,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="changeApplyId != null">#{changeApplyId},</if>
<if test="approvalPerson != null">#{approvalPerson},</if>
<if test="approvalSign != null">#{approvalSign},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTChangeApplyApprover" parameterType="TChangeApplyApprover">
update t_change_apply_approver
<trim prefix="SET" suffixOverrides=",">
<if test="changeApplyId != null">change_apply_id = #{changeApplyId},</if>
<if test="approvalPerson != null">approval_person = #{approvalPerson},</if>
<if test="approvalSign != null">approval_sign = #{approvalSign},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where change_apply_approver_id = #{changeApplyApproverId}
</update>
<delete id="deleteTChangeApplyApproverById" parameterType="Long">
delete from t_change_apply_approver where change_apply_approver_id = #{changeApplyApproverId}
</delete>
<delete id="deleteTChangeApplyApproverByIds" parameterType="String">
delete from t_change_apply_approver where change_apply_approver_id in
<foreach item="changeApplyApproverId" collection="array" open="(" separator="," close=")">
#{changeApplyApproverId}
</foreach>
</delete>
<insert id="batchInsertTChangeApplyApprover">
insert into t_change_apply_approver(change_apply_id,approval_person) VALUES
<foreach item="item" index="index" collection="list" separator=",">
(#{item.changeApplyId},#{item.approvalPerson})
</foreach>
</insert>
</mapper>
\ No newline at end of file
......@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="operateCode" column="operate_code" />
<result property="operateType" column="operate_type" />
<result property="deviceCode" column="device_code" />
<result property="deviceId" column="device_id" />
<result property="deviceName" column="device_name" />
<result property="deviceType" column="device_type" />
<result property="effectiveDate" column="effective_date" />
......@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTSpecialDeviceRecordVo">
select t.id, t.operate_code, t.operate_type, t.device_code, t.effective_date, t.record_status, t.create_time, t.update_time, t.is_del,
select t.id, t.operate_code, t.operate_type, t.device_id, t.effective_date, t.record_status, t.create_time, t.update_time, t.is_del,
d.device_name, d.device_type
from t_special_device_record t
left join t_device_info d on t.device_id = d.id
......@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> t.is_del = '0'
<if test="operateCode != null "> and t.operate_code = #{operateCode}</if>
<if test="operateType != null "> and t.operate_type = #{operateType}</if>
<if test="deviceCode != null and deviceCode != ''"> and t.device_code like concat('%', #{deviceCode}, '%')</if>
<if test="deviceName != null and deviceName != ''"> and d.device_name like concat('%', #{deviceName}, '%')</if>
<if test="effectiveDate != null "> and t.effective_date = #{effectiveDate}</if>
<if test="recordStatus != null and recordStatus != ''"> and t.record_status = #{recordStatus}</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
......@@ -53,7 +53,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">id,</if>
<if test="operateCode != null">operate_code,</if>
<if test="operateType != null">operate_type,</if>
<if test="deviceCode != null">device_code,</if>
<if test="deviceId != null">device_id,</if>
<if test="effectiveDate != null">effective_date,</if>
<if test="recordStatus != null">record_status,</if>
......@@ -65,7 +64,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">#{id},</if>
<if test="operateCode != null">#{operateCode},</if>
<if test="operateType != null">#{operateType},</if>
<if test="deviceCode != null">#{deviceCode},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="effectiveDate != null">#{effectiveDate},</if>
<if test="recordStatus != null">#{recordStatus},</if>
......@@ -79,7 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_special_device_record
<trim prefix="SET" suffixOverrides=",">
<if test="operateType != null">operate_type = #{operateType},</if>
<if test="deviceCode != null">device_code = #{deviceCode},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="effectiveDate != null">effective_date = #{effectiveDate},</if>
<if test="recordStatus != null">record_status = #{recordStatus},</if>
......
......@@ -65,7 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
group by t.user_id desc
</select>
<select id="allList" parameterType="TStaffForm" resultMap="TStaffResult">
SELECT *,user_id as staff_id FROM sys_user WHERE is_del = '0'
</select>
<select id="selectTStaffById" parameterType="Long" resultMap="TStaffResult">
<include refid="selectTStaffVo"/>
where t.user_id = #{staffId}
......
import request from '@/utils/request'
// 查询变更申请审批验收列表
export function listApproval(query) {
return request({
url: '/changeApply/approval/list',
method: 'get',
params: query
})
}
// 查询变更申请审批验收详细
export function getApproval(changeApplyId) {
return request({
url: '/changeApply/approval/' + changeApplyId,
method: 'get'
})
}
// 新增变更申请审批验收
export function addApproval(data) {
return request({
url: '/changeApply/approval',
method: 'post',
data: data
})
}
// 修改变更申请审批验收
export function updateApproval(data) {
return request({
url: '/changeApply/approval',
method: 'put',
data: data
})
}
// 删除变更申请审批验收
export function delApproval(changeApplyId) {
return request({
url: '/changeApply/approval/' + changeApplyId,
method: 'delete'
})
}
// 导出变更申请审批验收
export function exportApproval(query) {
return request({
url: '/changeApply/approval/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询变更申请审批人列表
export function listApprover(query) {
return request({
url: '/changeApply/approver/list',
method: 'get',
params: query
})
}
// 查询变更申请审批人详细
export function getApprover(changeApplyApproverId) {
return request({
url: '/changeApply/approver/' + changeApplyApproverId,
method: 'get'
})
}
// 新增变更申请审批人
export function addApprover(data) {
return request({
url: '/changeApply/approver',
method: 'post',
data: data
})
}
// 修改变更申请审批人
export function updateApprover(data) {
return request({
url: '/changeApply/approver',
method: 'put',
data: data
})
}
// 删除变更申请审批人
export function delApprover(changeApplyApproverId) {
return request({
url: '/changeApply/approver/' + changeApplyApproverId,
method: 'delete'
})
}
// 导出变更申请审批人
export function exportApprover(query) {
return request({
url: '/changeApply/approver/export',
method: 'get',
params: query
})
}
// 新增变更申请审批人
export function batchAddApprover(data) {
return request({
url: '/changeApply/approver/batchAdd',
method: 'post',
data: data
})
}
......@@ -9,7 +9,14 @@ export function listStaff(query) {
params: query
})
}
// 查询员工信息管理列表
export function listAllStaff(query) {
return request({
url: '/safetyManagement/staff/allList',
method: 'get',
params: query
})
}
// 查询员工用户课程列表 无分页
export function TStaffLisst(query) {
return request({
......
......@@ -21,7 +21,6 @@
:playId="'play'+num"
:isChoice="showVideoNum == num"
:ref="'play'+num"
:key="Math.random()"
>
</PlayVideo>
......@@ -48,6 +47,17 @@
mounted(){
this.spiltNum = 4;
},
watch: {
spiltNum(newVal, oldVal) {
this.$nextTick(() => {
/*现在数据已经渲染完毕*/
for (var i = 1; i <= this.spiltNum; i++) {
const playId = "play" + i;
this.$refs[playId][0].fit();
}
});
},
},
computed:{
countWidth(){
return (this.$refs.playVideo.offsetWidth-2)/Math.sqrt(this.spiltNum) + 'px';
......
<template>
<el-upload
class="upload-demo"
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:on-preview="handlePreview"
:on-remove="handleRemove"
:fileType="fileType"
:limit="1"
:on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:show-file-list="false"
:headers="headers"
:file-list="fileList">
<el-button size="small" type="text" icon="el-icon-upload">上传培训资料</el-button>
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
</el-upload>
</template>
<script>
import { getToken } from "@/utils/auth";
import { updateApproval } from "@/api/deviceManagement/changeApplyApproval";
export default {
name: "upload-materials",
props:{
changeApplyId:{
type: Number,
},
},
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
fileType: ["doc", "xls", "ppt", "txt", "pdf"]
};
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk) {
this.$message.error(
`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
);
return false;
}
}
// 校检文件大小
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
// 上传成功回调
handleUploadSuccess(res, file) {
updateApproval({ changeApplyId: this.changeApplyId, trainMaterial: res.url, changeApplyStatus: "3" }).then(res =>{
if(res.code == 200){
this.$message.success("上传成功");
this.$emit('getList');
}else{
this.$message.error("上传失败")
}
})
},
}
}
</script>
<style scoped lang="scss">
.upload-demo{
display: inline;
margin: 10px;
}
</style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="设备编号" prop="deviceCode">
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="queryParams.deviceCode"
placeholder="请输入设备编号"
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
......@@ -41,12 +41,6 @@
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" >
<template slot-scope="scope">
<span v-if="scope.row.deviceCode == '' || scope.row.deviceCode == null">-</span>
<span v-else>{{scope.row.deviceCode}}</span>
</template>
</el-table-column>
<el-table-column label="登记有效日期" align="center" prop="effectiveDate" width="180">
<template slot-scope="scope">
<span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())<30 && getDays(scope.row.effectiveDate, new Date())>0" style="color: red;">
......@@ -127,7 +121,7 @@ export default {
pageNum: 1,
pageSize: 10,
operateId: null,
deviceCode: null,
deviceName: null,
effectiveDate: null,
maintenanceRecord: null,
},
......@@ -161,7 +155,6 @@ export default {
this.form = {
id: null,
operateId: null,
deviceCode: null,
effectiveDate: null,
maintenanceRecord: null,
createTime: null
......
......@@ -851,7 +851,7 @@
import FileUpload from '@/components/FileUpload';
import { listBook, getBook, delBook, addBook, updateBook, exportBook } from "@/api/system/book";
import { listDept } from "@/api/system/dept";
import { listStaff } from "@/api/safetyManagement/staff";
import { listAllStaff } from "@/api/safetyManagement/staff";
import { getUserProfile } from "@/api/system/user";
let uploadfile = require("@/assets/uploadfile.png");
export default {
......@@ -992,7 +992,7 @@ export default {
/** 查询员工列表 */
getStaffList() {
this.loading = true;
listStaff(this.queryParams2).then(response => {
listAllStaff(this.queryParams2).then(response => {
this.staffList = response.rows;
this.staffList2 = response.rows;
this.loading = false;
......@@ -1374,6 +1374,8 @@ export default {
left: 120px;
font-size: 17px;
color: red;
width: 200px;
height: 0px;
}
::v-deep .el-dialog__body{
padding:0px 20px!important;
......
......@@ -309,7 +309,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
// this.getList();
},
/** 重置按钮操作 */
resetQuery() {
......
......@@ -35,7 +35,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_TARGET,
// target: `http://192.168.2.21:8908/dangerManage`,
// target: `http://localhost:8908/dangerManage`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment