Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
36310b51aa
|
|
@ -201,6 +201,11 @@ public class Constants
|
|||
*/
|
||||
public static final String TB_PRO_MONTH_TABLE = "tb_pro_month_table";
|
||||
|
||||
/**
|
||||
* 分包商信息表
|
||||
*/
|
||||
public static final String QUESTION_RECORD = "question_record";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
package com.bonus.bmw.controller;
|
||||
|
||||
import com.bonus.bmw.domain.vo.BmAppVersion;
|
||||
import com.bonus.bmw.service.BmAppVersionService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* APP版本表(bm_app_version)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/appVersion")
|
||||
public class BmAppVersionController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private BmAppVersionService service;
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param o
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false), requiresPermissions = @RequiresPermissions("worker:question:list"))
|
||||
@GetMapping("/list")
|
||||
@SysLog(title = "APP版本更新记录", businessType = OperaType.QUERY, logType = 0, module = "APP版本更新记录", details = "APP版本更新记录")
|
||||
public TableDataInfo list(BmAppVersion o) {
|
||||
try {
|
||||
startPage();
|
||||
List<BmAppVersion> list = service.selectAppVersionList(o);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return getDataTableError(new ArrayList<>());
|
||||
}
|
||||
|
||||
@PostMapping("/insert")
|
||||
@SysLog(title = "新增版本更新记录", businessType = OperaType.UPDATE, logType = 0, module = "新增版本更新记录", details = "新增版本更新记录")
|
||||
public AjaxResult exit(@RequestBody BmAppVersion o) {
|
||||
try {
|
||||
return service.insert(o);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
@PostMapping("/del")
|
||||
@SysLog(title = "删除版本更新记录", businessType = OperaType.UPDATE, logType = 0, module = "删除版本更新记录")
|
||||
public AjaxResult del(@Validated @RequestBody BmAppVersion o) {
|
||||
try {
|
||||
int res = service.delete(o.getId());
|
||||
if (res>0){
|
||||
return toAjax(res);
|
||||
}else {
|
||||
return error("删除失败");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
@PostMapping("/selectLatestVersion")
|
||||
@SysLog(title = "删除版本更新记录", businessType = OperaType.UPDATE, logType = 0, module = "删除版本更新记录")
|
||||
public AjaxResult selectLatestVersion() {
|
||||
try {
|
||||
return service.selectLatestVersion();
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.bonus.bmw.controller;
|
||||
|
||||
import com.bonus.bmw.domain.vo.KqCmdBean;
|
||||
import com.bonus.bmw.service.KqCmdService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 考勤机操作控制层
|
||||
*
|
||||
* @author fly
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/kqManager")
|
||||
public class KqCmdController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private KqCmdService service;
|
||||
|
||||
/**
|
||||
* 工程-考勤机树
|
||||
*
|
||||
* @param o 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("getProKqjTree")
|
||||
@SysLog(title = "工程考勤机树", businessType = OperaType.QUERY, logType = 0, module = "工程考勤机树", details = "工程考勤机树")
|
||||
public AjaxResult getProKqjTree(KqCmdBean o) {
|
||||
try {
|
||||
return service.getProKqjTree(o);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package com.bonus.bmw.controller;
|
||||
|
||||
import com.bonus.bmw.domain.dto.QuestionRecordDto;
|
||||
import com.bonus.bmw.service.QuestionRecordService;
|
||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import com.bonus.common.core.utils.json.FastJsonHelper;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* app部分接口
|
||||
* @author fly
|
||||
* @date 2025/8/23
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/question")
|
||||
public class QuestionRecordController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private QuestionRecordService service;
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param o
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth(isUser = false), requiresPermissions = @RequiresPermissions("worker:question:list"))
|
||||
@GetMapping("/list")
|
||||
@SysLog(title = "问题记录列表", businessType = OperaType.QUERY, logType = 0, module = "问题记录列表", details = "问题记录列表")
|
||||
public TableDataInfo list(QuestionRecordDto o) {
|
||||
try {
|
||||
startPage();
|
||||
List<QuestionRecordDto> list = service.selectQuestionRecordList(o);
|
||||
return getDataTable(list);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return getDataTableError(new ArrayList<>());
|
||||
}
|
||||
|
||||
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:question:insert"))
|
||||
@PostMapping("/insert")
|
||||
@SysLog(title = "新增问题记录", businessType = OperaType.UPDATE, logType = 0, module = "新增问题记录", details = "新增问题记录")
|
||||
public AjaxResult exit(@RequestParam(value = "files",required = false) MultipartFile[] files, @RequestParam(value = "params")String params) {
|
||||
try {
|
||||
params= Sm4Utils.decrypt(params);
|
||||
QuestionRecordDto o = FastJsonHelper.jsonStrToBean(params, QuestionRecordDto.class);
|
||||
//先将数据对应关系处理还
|
||||
return service.insert(o,files);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除分包商
|
||||
*/
|
||||
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:question:del"))
|
||||
@PostMapping("/del")
|
||||
@SysLog(title = "删除问题记录", businessType = OperaType.UPDATE, logType = 0, module = "删除问题记录")
|
||||
public AjaxResult del(@Validated @RequestBody QuestionRecordDto o) {
|
||||
try {
|
||||
int res = service.del(o);
|
||||
if (res>0){
|
||||
return toAjax(res);
|
||||
}else {
|
||||
return error("删除失败");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分包商
|
||||
*/
|
||||
// @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("worker:question:deal"))
|
||||
@PostMapping("/deal")
|
||||
@SysLog(title = "处理问题", businessType = OperaType.UPDATE, logType = 0, module = "处理问题")
|
||||
public AjaxResult deal(@Validated @RequestBody QuestionRecordDto o) {
|
||||
try {
|
||||
return service.deal(o);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.bonus.bmw.domain.dto;
|
||||
|
||||
import com.bonus.system.api.model.UploadFileVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人员基础信息表
|
||||
*/
|
||||
@Data
|
||||
public class QuestionRecordDto {
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 模块
|
||||
*/
|
||||
private String module;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
private String content;
|
||||
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
/**
|
||||
* 提出人
|
||||
*/
|
||||
private String submitter;
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
private String handler;
|
||||
|
||||
/**
|
||||
* 解决回复
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 处理时间
|
||||
*/
|
||||
private String updateTime;
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
private Integer updateId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Integer createId;
|
||||
|
||||
/**
|
||||
* 文件列表
|
||||
*/
|
||||
List<UploadFileVo> file;
|
||||
|
||||
/**
|
||||
* 删除文件id集合
|
||||
*/
|
||||
List<String> fileIdList;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
package com.bonus.bmw.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* APP版本表
|
||||
*/
|
||||
@Data
|
||||
public class BmAppVersion {
|
||||
/**
|
||||
* 自增主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* apk名称
|
||||
*/
|
||||
private String apkName;
|
||||
|
||||
/**
|
||||
* apk路径
|
||||
*/
|
||||
private String apkPath;
|
||||
|
||||
/**
|
||||
* 更新内容
|
||||
*/
|
||||
private String updateContent;
|
||||
|
||||
/**
|
||||
* 部署时间
|
||||
*/
|
||||
private Date deployTime;
|
||||
|
||||
/**
|
||||
* 部署人员
|
||||
*/
|
||||
private String deployUser;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.bonus.bmw.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 考勤任务信息表
|
||||
*/
|
||||
@Data
|
||||
public class KqCmdBean {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 指令编码
|
||||
*/
|
||||
private String cmdCode;
|
||||
|
||||
/**
|
||||
* 指令参数
|
||||
*/
|
||||
private String cmdParam;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* 任务状态 0 待执行 1已执行 2 完成 3执行失败 4 取消
|
||||
*/
|
||||
private String transStatus;
|
||||
|
||||
/**
|
||||
* 任务执行更新时间
|
||||
*/
|
||||
private Date transStatusUpdateTime;
|
||||
|
||||
/**
|
||||
* 更新状态 默认 0 1 则是更新数据
|
||||
*/
|
||||
private Integer updateState;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 工程id
|
||||
*/
|
||||
private Integer proId;
|
||||
|
||||
private String proName;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.bonus.bmw.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class TreeNode {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String type;
|
||||
private List<TreeNode> children;
|
||||
|
||||
public TreeNode(String id, String name, String type) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void addChild(TreeNode child) { this.children.add(child); }
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.bonus.bmw.mapper;
|
||||
|
||||
import com.bonus.bmw.domain.vo.BmAppVersion;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BmAppVersionMapper {
|
||||
/**
|
||||
* delete by primary key
|
||||
* @param id primaryKey
|
||||
* @return deleteCount
|
||||
*/
|
||||
int delete(Integer id);
|
||||
|
||||
/**
|
||||
* insert record to table
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insert(BmAppVersion record);
|
||||
|
||||
/**
|
||||
* insert record to table selective
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insertSelective(BmAppVersion record);
|
||||
|
||||
/**
|
||||
* select by primary key
|
||||
* @param id primary key
|
||||
* @return object by primary key
|
||||
*/
|
||||
BmAppVersion selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* update record selective
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKeySelective(BmAppVersion record);
|
||||
|
||||
/**
|
||||
* update record
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(BmAppVersion record);
|
||||
|
||||
List<BmAppVersion> selectAppVersionList(BmAppVersion o);
|
||||
|
||||
BmAppVersion selectLatestVersion();
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.bonus.bmw.mapper;
|
||||
|
||||
import com.bonus.bmw.domain.vo.KqCmdBean;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface KqCmdMapper {
|
||||
|
||||
List<KqCmdBean> getProKqjTree(KqCmdBean o);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.bonus.bmw.mapper;
|
||||
|
||||
import com.bonus.bmw.domain.dto.QuestionRecordDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface QuestionRecordMapper {
|
||||
|
||||
|
||||
List<QuestionRecordDto> selectQuestionRecordList(QuestionRecordDto o);
|
||||
|
||||
int insert(QuestionRecordDto o);
|
||||
|
||||
int del(QuestionRecordDto o);
|
||||
|
||||
int deal(QuestionRecordDto o);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.bonus.bmw.service;
|
||||
|
||||
import com.bonus.bmw.domain.vo.BmAppVersion;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BmAppVersionService{
|
||||
|
||||
int delete(Integer id);
|
||||
|
||||
AjaxResult insert(BmAppVersion record);
|
||||
|
||||
List<BmAppVersion> selectAppVersionList(BmAppVersion o);
|
||||
|
||||
AjaxResult selectLatestVersion();
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.bonus.bmw.service;
|
||||
|
||||
import com.bonus.bmw.domain.vo.KqCmdBean;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
||||
public interface KqCmdService{
|
||||
|
||||
AjaxResult getProKqjTree(KqCmdBean o);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.bonus.bmw.service;
|
||||
|
||||
import com.bonus.bmw.domain.dto.QuestionRecordDto;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface QuestionRecordService {
|
||||
|
||||
List<QuestionRecordDto> selectQuestionRecordList(QuestionRecordDto o);
|
||||
|
||||
AjaxResult insert(QuestionRecordDto o, MultipartFile[] files);
|
||||
|
||||
int del(QuestionRecordDto o);
|
||||
|
||||
AjaxResult deal(QuestionRecordDto o);
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.bonus.bmw.service.impl;
|
||||
|
||||
import com.bonus.bmw.domain.vo.BmAppVersion;
|
||||
import com.bonus.bmw.mapper.BmAppVersionMapper;
|
||||
import com.bonus.bmw.service.BmAppVersionService;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BmAppVersionServiceImpl implements BmAppVersionService{
|
||||
|
||||
@Resource
|
||||
private BmAppVersionMapper mapper;
|
||||
|
||||
@Override
|
||||
public int delete(Integer id) {
|
||||
return mapper.delete(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult insert(BmAppVersion record) {
|
||||
int insert = mapper.insert(record);
|
||||
return insert > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BmAppVersion> selectAppVersionList(BmAppVersion o) {
|
||||
return mapper.selectAppVersionList(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectLatestVersion() {
|
||||
BmAppVersion o = mapper.selectLatestVersion();
|
||||
return AjaxResult.success(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
package com.bonus.bmw.service;
|
||||
package com.bonus.bmw.service.impl;
|
||||
|
||||
import com.bonus.bmw.mapper.CertificateStatisticsMapper;
|
||||
import com.bonus.bmw.domain.vo.CertificateStatisticsBean;
|
||||
import com.bonus.bmw.service.CertificateStatisticsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* packageName com.bonus.gzrn.rnbmw.certificate.service
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.bonus.bmw.service.impl;
|
||||
|
||||
import com.bonus.bmw.domain.vo.KqCmdBean;
|
||||
import com.bonus.bmw.domain.vo.TreeNode;
|
||||
import com.bonus.bmw.mapper.KqCmdMapper;
|
||||
import com.bonus.bmw.service.KqCmdService;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class KqCmdServiceImpl implements KqCmdService {
|
||||
|
||||
@Resource
|
||||
private KqCmdMapper mapper;
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult getProKqjTree(KqCmdBean o) {
|
||||
List<KqCmdBean> list = mapper.getProKqjTree(o);
|
||||
// 构建设备树
|
||||
List<TreeNode> deviceTree = buildDeviceTree(list);
|
||||
return AjaxResult.success(deviceTree);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建设备树
|
||||
* @param data 包含pro_id和device_code的数据列表
|
||||
* @return 树形结构的根节点列表
|
||||
*/
|
||||
public static List<TreeNode> buildDeviceTree(List<KqCmdBean> data) {
|
||||
// 使用Map来存储pro_id到设备列表的映射
|
||||
Map<String, List<String>> proToDeviceMap = new HashMap<>();
|
||||
// 遍历数据,建立映射关系
|
||||
for (KqCmdBean item : data) {
|
||||
String proName = item.getProName();
|
||||
String deviceCode = item.getDeviceCode();
|
||||
proToDeviceMap.computeIfAbsent(proName, k -> new ArrayList<>()).add(deviceCode);
|
||||
}
|
||||
// 构建树形结构
|
||||
List<TreeNode> result = new ArrayList<>();
|
||||
for (Map.Entry<String, List<String>> entry : proToDeviceMap.entrySet()) {
|
||||
String proName = entry.getKey();
|
||||
List<String> deviceCodes = entry.getValue();
|
||||
// 创建项目节点
|
||||
TreeNode projectNode = new TreeNode(proName, "项目" + proName, "project");
|
||||
// 为每个设备码创建子节点
|
||||
for (String deviceCode : deviceCodes) {
|
||||
TreeNode deviceNode = new TreeNode(deviceCode, "设备" + deviceCode, "device");
|
||||
projectNode.addChild(deviceNode);
|
||||
}
|
||||
result.add(projectNode);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -341,11 +341,11 @@ public class PmWorkerServiceImpl implements PmWorkerService{
|
|||
}
|
||||
//合同
|
||||
BmWorkerWageCard bmWorkerWageCard = new BmWorkerWageCard();
|
||||
bmWorkerWageCard.setWorkerId(worker.getId());
|
||||
bmWorkerWageCard.setBankCardCode(worker.getBankCardCode());
|
||||
bmWorkerWageCard.setBankName(worker.getBankName());
|
||||
bmWorkerWageCard.setBankBranchName(worker.getBankBranchName());
|
||||
bmWorkerWageCard.setBankIdentifierCode(worker.getBankIdentifierCode());
|
||||
bmWorkerWageCard.setWorkerId(export.getId());
|
||||
bmWorkerWageCard.setBankCardCode(export.getBankCardCode());
|
||||
bmWorkerWageCard.setBankName(export.getBankName());
|
||||
bmWorkerWageCard.setBankBranchName(export.getBankBranchName());
|
||||
bmWorkerWageCard.setBankIdentifierCode(export.getBankIdentifierCode());
|
||||
insertWorkerWageCard(bmWorkerWageCard);
|
||||
//入场
|
||||
importEinData(export);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
package com.bonus.bmw.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.bonus.bmw.domain.dto.QuestionRecordDto;
|
||||
import com.bonus.bmw.mapper.QuestionRecordMapper;
|
||||
import com.bonus.bmw.service.QuestionRecordService;
|
||||
import com.bonus.common.core.constant.Constants;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.model.UploadFileVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/8/14
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class QuestionRecordServiceImpl implements QuestionRecordService {
|
||||
|
||||
@Resource
|
||||
private QuestionRecordMapper mapper;
|
||||
|
||||
@Autowired
|
||||
private FileUploadUtils fileUploadUtils;
|
||||
|
||||
|
||||
@Override
|
||||
public List<QuestionRecordDto> selectQuestionRecordList(QuestionRecordDto o) {
|
||||
List<QuestionRecordDto> list = mapper.selectQuestionRecordList(o);
|
||||
if (!list.isEmpty()){
|
||||
for (QuestionRecordDto bean:list) {
|
||||
List<UploadFileVo> contractFile = fileUploadUtils.getFileList("", bean.getId().toString(), Constants.QUESTION_RECORD, "");
|
||||
bean.setFile(contractFile);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult insert(QuestionRecordDto o, MultipartFile[] files) {
|
||||
o.setCreateId(Math.toIntExact(SecurityUtils.getLoginUser().getUserid()));
|
||||
int insert = mapper.insert(o);
|
||||
if (insert > 0) {
|
||||
String[] sourceType = new String[files.length];
|
||||
Arrays.fill(sourceType, "1");
|
||||
fileUploadUtils.uploadFile(files, Constants.QUESTION_RECORD, o.getId().toString(), sourceType, "", "");
|
||||
}
|
||||
|
||||
return insert > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int del(QuestionRecordDto o) {
|
||||
int res = mapper.del(o);
|
||||
//删除合同图片 删除minio文件
|
||||
fileUploadUtils.delFileListById("", o.getId().toString(), Constants.QUESTION_RECORD,"");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult deal(QuestionRecordDto o) {
|
||||
o.setUpdateTime(DateUtil.now());
|
||||
o.setUpdateId(Math.toIntExact(SecurityUtils.getLoginUser().getUserid()));
|
||||
int res = mapper.deal(o);
|
||||
return res > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<?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.bonus.bmw.mapper.BmAppVersionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.bonus.bmw.domain.vo.BmAppVersion">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table bm_app_version-->
|
||||
<id column="id" property="id" />
|
||||
<result column="version" property="version" />
|
||||
<result column="apk_name" property="apkName" />
|
||||
<result column="apk_path" property="apkPath" />
|
||||
<result column="update_content" property="updateContent" />
|
||||
<result column="deploy_time" property="deployTime" />
|
||||
<result column="deploy_user" property="deployUser" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, version, apk_name, apk_path, update_content, deploy_time, deploy_user, remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_app_version
|
||||
where id = #{id}
|
||||
</select>
|
||||
<delete id="delete" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from bm_app_version
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.bmw.domain.vo.BmAppVersion" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_app_version (version, apk_name, apk_path, update_content, remark)
|
||||
values (#{version}, #{apkName}, #{apkPath}, #{updateContent}, #{remark})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bonus.bmw.domain.vo.BmAppVersion" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_app_version
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="version != null">
|
||||
version,
|
||||
</if>
|
||||
<if test="apkName != null">
|
||||
apk_name,
|
||||
</if>
|
||||
<if test="apkPath != null">
|
||||
apk_path,
|
||||
</if>
|
||||
<if test="updateContent != null">
|
||||
update_content,
|
||||
</if>
|
||||
<if test="deployTime != null">
|
||||
deploy_time,
|
||||
</if>
|
||||
<if test="deployUser != null">
|
||||
deploy_user,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="version != null">
|
||||
#{version},
|
||||
</if>
|
||||
<if test="apkName != null">
|
||||
#{apkName},
|
||||
</if>
|
||||
<if test="apkPath != null">
|
||||
#{apkPath},
|
||||
</if>
|
||||
<if test="updateContent != null">
|
||||
#{updateContent},
|
||||
</if>
|
||||
<if test="deployTime != null">
|
||||
#{deployTime},
|
||||
</if>
|
||||
<if test="deployUser != null">
|
||||
#{deployUser},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.bmw.domain.vo.BmAppVersion">
|
||||
<!--@mbg.generated-->
|
||||
update bm_app_version
|
||||
<set>
|
||||
<if test="version != null">
|
||||
version = #{version},
|
||||
</if>
|
||||
<if test="apkName != null">
|
||||
apk_name = #{apkName},
|
||||
</if>
|
||||
<if test="apkPath != null">
|
||||
apk_path = #{apkPath},
|
||||
</if>
|
||||
<if test="updateContent != null">
|
||||
update_content = #{updateContent},
|
||||
</if>
|
||||
<if test="deployTime != null">
|
||||
deploy_time = #{deployTime},
|
||||
</if>
|
||||
<if test="deployUser != null">
|
||||
deploy_user = #{deployUser},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.bonus.bmw.domain.vo.BmAppVersion">
|
||||
<!--@mbg.generated-->
|
||||
update bm_app_version
|
||||
set version = #{version},
|
||||
apk_name = #{apkName},
|
||||
apk_path = #{apkPath},
|
||||
update_content = #{updateContent},
|
||||
deploy_time = #{deployTime},
|
||||
deploy_user = #{deployUser},
|
||||
remark = #{remark}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectAppVersionList" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_app_version
|
||||
order by deploy_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectLatestVersion" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_app_version
|
||||
order by deploy_time desc
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?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.bonus.bmw.mapper.KqCmdMapper">
|
||||
<resultMap id="BaseResultMap" type="com.bonus.bmw.domain.vo.KqCmdBean">
|
||||
<id column="id" property="id" />
|
||||
<result column="cmd_code" property="cmdCode" />
|
||||
<result column="cmd_param" property="cmdParam" />
|
||||
<result column="device_code" property="deviceCode" />
|
||||
<result column="trans_status" property="transStatus" />
|
||||
<result column="trans_status_update_time" property="transStatusUpdateTime" />
|
||||
<result column="update_state" property="updateState" />
|
||||
<result column="msg" property="msg" />
|
||||
<result column="pro_id" property="proId" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getProKqjTree" resultType="com.bonus.bmw.domain.vo.KqCmdBean">
|
||||
select
|
||||
pp.pro_name,device_code
|
||||
from pm_att_device pad
|
||||
inner join pm_project pp on pad.pro_id = pp.id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
psc.sub_company_name as subComName
|
||||
from pm_sub ps
|
||||
left join pm_sub_company psc on ps.sub_com_id = psc.id
|
||||
where is_active='1'
|
||||
where ps.is_active='1'
|
||||
<if test="subComId!= null " >
|
||||
and ps.sub_com_id=#{subComId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
<?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.bonus.bmw.mapper.QuestionRecordMapper">
|
||||
|
||||
<select id="selectQuestionRecordList" resultType="com.bonus.bmw.domain.dto.QuestionRecordDto">
|
||||
select
|
||||
qr.id,
|
||||
qr.module,
|
||||
qr.content,
|
||||
qr.status,
|
||||
qr.submitter,
|
||||
qr.handler,
|
||||
qr.create_time,
|
||||
qr.update_time
|
||||
from question_record qr
|
||||
<where>
|
||||
qr.is_active = 1
|
||||
<if test="module != null and module != ''">
|
||||
and qr.module = #{module}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and qr.content like concat('%',#{content},'%')
|
||||
</if>
|
||||
<if test="submitter != null and submitter != ''">
|
||||
and qr.submitter = #{submitter}
|
||||
</if>
|
||||
<if test="handler != null and handler != ''">
|
||||
and qr.handler = #{handler}
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
and locate( #{createTime},qr.create_time)
|
||||
</if>
|
||||
order by create_time desc
|
||||
</where>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="id" keyColumn="id" useGeneratedKeys="true">
|
||||
insert into question_record( module, content, submitter,create_id)
|
||||
values( #{module}, #{content}, #{submitter}, #{createId})
|
||||
</insert>
|
||||
|
||||
<update id="del">
|
||||
update question_record set is_active = 0 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deal">
|
||||
update question_record set handler = #{handler},update_time = #{updateTime},status = #{status},reamrk = #{remark},update_id = #{updateId} where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue