commit
7aadd2c975
@ -0,0 +1,105 @@
|
|||||||
|
package com.mudu.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mudu.base.controller.BaseController;
|
||||||
|
import com.mudu.base.domain.AjaxResult;
|
||||||
|
import com.mudu.entity.ASafeBqbhpx;
|
||||||
|
import com.mudu.service.ASafeBqbhpxService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班前班后表(ASafeBqbhpx)表控制层
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("pharmaceuticals/aSafeBqbhpx")
|
||||||
|
@Api(tags = "班前班后表")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class ASafeBqbhpxController extends BaseController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ASafeBqbhpxService aSafeBqbhpxService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页条件查询所有数据
|
||||||
|
*
|
||||||
|
* @param page 分页条件
|
||||||
|
* @param aSafeBqbhpx 查询条件
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@GetMapping
|
||||||
|
@ApiOperation(value = "分页条件查询班前班后表", response = ASafeBqbhpx.class)
|
||||||
|
public AjaxResult page(Page<ASafeBqbhpx> page, ASafeBqbhpx aSafeBqbhpx) {
|
||||||
|
return success(aSafeBqbhpxService.page(page, new QueryWrapper<>(aSafeBqbhpx)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
@ApiOperation(value = "通过主键查询单条班前班后表", response = ASafeBqbhpx.class)
|
||||||
|
public AjaxResult getById(@PathVariable Serializable id) {
|
||||||
|
return success(aSafeBqbhpxService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param aSafeBqbhpx 实体对象
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "新增班前班后表", response = ASafeBqbhpx.class)
|
||||||
|
public AjaxResult insert(@RequestBody ASafeBqbhpx aSafeBqbhpx) {
|
||||||
|
return success(aSafeBqbhpxService.save(aSafeBqbhpx));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param aSafeBqbhpx 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "修改班前班后表")
|
||||||
|
public AjaxResult update(@RequestBody ASafeBqbhpx aSafeBqbhpx) {
|
||||||
|
return success(aSafeBqbhpxService.updateById(aSafeBqbhpx));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param idList 主键集合
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
@ApiOperation(value = "删除班前班后表")
|
||||||
|
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return success(aSafeBqbhpxService.removeByIds(idList));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.mudu.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.mudu.base.controller.BaseController;
|
||||||
|
import com.mudu.base.domain.AjaxResult;
|
||||||
|
import com.mudu.entity.ASafeQyzypgl;
|
||||||
|
import com.mudu.service.ASafeQyzypglService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ASafeQyzypgl)表控制层
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:52
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("pharmaceuticals/aSafeQyzypgl")
|
||||||
|
@Api(tags = "")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class ASafeQyzypglController extends BaseController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private ASafeQyzypglService aSafeQyzypglService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页条件查询所有数据
|
||||||
|
*
|
||||||
|
* @param page 分页条件
|
||||||
|
* @param aSafeQyzypgl 查询条件
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@GetMapping
|
||||||
|
@ApiOperation(value = "分页条件查询", response = ASafeQyzypgl.class)
|
||||||
|
public AjaxResult page(Page<ASafeQyzypgl> page, ASafeQyzypgl aSafeQyzypgl) {
|
||||||
|
return success(aSafeQyzypglService.page(page, new QueryWrapper<>(aSafeQyzypgl)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
@ApiOperation(value = "通过主键查询单条", response = ASafeQyzypgl.class)
|
||||||
|
public AjaxResult getById(@PathVariable Serializable id) {
|
||||||
|
return success(aSafeQyzypglService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param aSafeQyzypgl 实体对象
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
@ApiOperation(value = "新增", response = ASafeQyzypgl.class)
|
||||||
|
public AjaxResult insert(@RequestBody ASafeQyzypgl aSafeQyzypgl) {
|
||||||
|
return success(aSafeQyzypglService.save(aSafeQyzypgl));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param aSafeQyzypgl 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
public AjaxResult update(@RequestBody ASafeQyzypgl aSafeQyzypgl) {
|
||||||
|
return success(aSafeQyzypglService.updateById(aSafeQyzypgl));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param idList 主键集合
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return success(aSafeQyzypglService.removeByIds(idList));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
|||||||
|
package com.mudu.entity;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班前班后表(ASafeBqbhpx)表实体类
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("班前班后表实体类")
|
||||||
|
@TableName(value = "a_safe_bqbhpx")
|
||||||
|
public class ASafeBqbhpx implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -66341095192129852L;
|
||||||
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@ApiModelProperty(value = "信息编号")
|
||||||
|
private String xxbh;
|
||||||
|
/**
|
||||||
|
* 企业编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业编号")
|
||||||
|
private String qybh;
|
||||||
|
/**
|
||||||
|
* 班组名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "班组名称")
|
||||||
|
private String bzmc;
|
||||||
|
/**
|
||||||
|
* 班组长姓名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "班组长姓名")
|
||||||
|
private String bzzxm;
|
||||||
|
/**
|
||||||
|
* 参培人数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "参培人数")
|
||||||
|
private Integer cprs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 培训时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "培训时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date pxkssj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宣传内容简述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "宣传内容简述")
|
||||||
|
private String xcnrjs;
|
||||||
|
/**
|
||||||
|
* 行政区划
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "行政区划")
|
||||||
|
private String xzqh;
|
||||||
|
/**
|
||||||
|
* 行政区划名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "行政区划名称")
|
||||||
|
private String xzqhmc;
|
||||||
|
/**
|
||||||
|
* 培训现场照片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "培训现场照片")
|
||||||
|
private String pxxctp;
|
||||||
|
/**
|
||||||
|
* 入库人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "入库人员")
|
||||||
|
private String rkry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人员")
|
||||||
|
private String gxry;
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "入库时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private LocalDateTime rksj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private LocalDateTime gxsj;
|
||||||
|
/**
|
||||||
|
* 记录状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "记录状态")
|
||||||
|
private Integer jlzt;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,136 @@
|
|||||||
|
package com.mudu.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ASafeQyzypgl)表实体类
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:52
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("实体类")
|
||||||
|
@TableName(value = "a_safe_qyzypgl")
|
||||||
|
public class ASafeQyzypgl implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -69045420615258953L;
|
||||||
|
/**
|
||||||
|
* 信息编号
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@ApiModelProperty(value = "信息编号")
|
||||||
|
private String xxbh;
|
||||||
|
/**
|
||||||
|
* 作业类型id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业类型id")
|
||||||
|
private String zylxid;
|
||||||
|
/**
|
||||||
|
* 作业类型value
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业类型value")
|
||||||
|
private String zylxvalue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date zysj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业人员")
|
||||||
|
private String zyry;
|
||||||
|
/**
|
||||||
|
* 作业地点
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业地点")
|
||||||
|
private String zydd;
|
||||||
|
/**
|
||||||
|
* 作业方式
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业方式")
|
||||||
|
private String zyfs;
|
||||||
|
/**
|
||||||
|
* 作业原因
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业原因")
|
||||||
|
private String zyyy;
|
||||||
|
/**
|
||||||
|
* 风险描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "风险描述")
|
||||||
|
private String fxms;
|
||||||
|
/**
|
||||||
|
* 防范措施
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "防范措施")
|
||||||
|
private String ffcs;
|
||||||
|
/**
|
||||||
|
* 作业状态 0-待签名 1-待作业 2-已作业
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "作业状态 0-待签名 1-待作业 2-已作业")
|
||||||
|
private String zyzt;
|
||||||
|
/**
|
||||||
|
* 企业编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业编号")
|
||||||
|
private String qybh;
|
||||||
|
/**
|
||||||
|
* 企业名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "企业名称")
|
||||||
|
private String qymc;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String ssbm;
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "入库时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private LocalDateTime rksj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private LocalDateTime gxsj;
|
||||||
|
/**
|
||||||
|
* 入库人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "入库人员")
|
||||||
|
private String rkry;
|
||||||
|
/**
|
||||||
|
* 更新人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "更新人员")
|
||||||
|
private String gxry;
|
||||||
|
/**
|
||||||
|
* 记录状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "记录状态")
|
||||||
|
private Integer jlzt;
|
||||||
|
/**
|
||||||
|
* 监护人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "监护人员")
|
||||||
|
private String jhry;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.mudu.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mudu.entity.ASafeBqbhpx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班前班后表(ASafeBqbhpx)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
public interface ASafeBqbhpxMapper extends BaseMapper<ASafeBqbhpx> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.mudu.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.mudu.entity.ASafeQyzypgl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ASafeQyzypgl)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:52
|
||||||
|
*/
|
||||||
|
public interface ASafeQyzypglMapper extends BaseMapper<ASafeQyzypgl> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.mudu.quartz;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.mudu.entity.ASafeBqbhpx;
|
||||||
|
import com.mudu.entity.ASafeQyzypgl;
|
||||||
|
import com.mudu.service.ASafeBqbhpxService;
|
||||||
|
import com.mudu.service.ASafeQyzypglService;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班前班后以及特殊作业的数据接收
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024/4/26 下午4:40
|
||||||
|
*/
|
||||||
|
//@RestController
|
||||||
|
//@RequestMapping("mudu/test")
|
||||||
|
//@Api(tags = "班前班后以及特殊作业的数据接收")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Configuration
|
||||||
|
@EnableScheduling
|
||||||
|
public class BqbhTszyQuartz {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ASafeBqbhpxService safeBqbhpxService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ASafeQyzypglService safeQyzypglService;
|
||||||
|
|
||||||
|
@Value("${bqbhUrl}")
|
||||||
|
private String bqbhUrl;
|
||||||
|
|
||||||
|
@Value("${tszyUrl}")
|
||||||
|
private String tszyUrl;
|
||||||
|
|
||||||
|
@Value("${api}")
|
||||||
|
private String api;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存班前班后数据
|
||||||
|
*/
|
||||||
|
// @GetMapping("/bqbh")
|
||||||
|
// @ApiOperation(value = "保存班前班后数据")
|
||||||
|
@Scheduled(cron = "0 0 1 * * ? ")
|
||||||
|
public void saveBqbh() {
|
||||||
|
String res = HttpRequest.get(bqbhUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").execute().body();
|
||||||
|
JSONObject resObj = JSON.parseObject(res);
|
||||||
|
String dataList = resObj.getString("data");
|
||||||
|
if (StrUtil.isEmpty(dataList)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<ASafeBqbhpx> list = JSON.parseArray(dataList, ASafeBqbhpx.class);
|
||||||
|
list.forEach(x -> {
|
||||||
|
if (StrUtil.isNotEmpty(x.getPxxctp())) {
|
||||||
|
x.setPxxctp(api + x.getPxxctp());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
safeBqbhpxService.saveBatch(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存特殊作业数据
|
||||||
|
*/
|
||||||
|
// @GetMapping("/tszy")
|
||||||
|
// @ApiOperation(value = "保存特殊作业数据")
|
||||||
|
@Scheduled(cron = "0 0 1 * * ? ")
|
||||||
|
public void saveTszy() {
|
||||||
|
String res = HttpRequest.get(tszyUrl).contentType("application/x-www-form-urlencoded;charset=UTF-8").execute().body();
|
||||||
|
JSONObject resObj = JSON.parseObject(res);
|
||||||
|
String dataList = resObj.getString("data");
|
||||||
|
if (StrUtil.isEmpty(dataList)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<ASafeQyzypgl> list = JSON.parseArray(dataList, ASafeQyzypgl.class);
|
||||||
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
|
safeQyzypglService.saveBatch(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.mudu.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mudu.entity.ASafeBqbhpx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班前班后表(ASafeBqbhpx)表服务接口
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
public interface ASafeBqbhpxService extends IService<ASafeBqbhpx> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.mudu.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.mudu.entity.ASafeQyzypgl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ASafeQyzypgl)表服务接口
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
public interface ASafeQyzypglService extends IService<ASafeQyzypgl> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.mudu.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mudu.mapper.ASafeBqbhpxMapper;
|
||||||
|
import com.mudu.entity.ASafeBqbhpx;
|
||||||
|
import com.mudu.service.ASafeBqbhpxService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班前班后表(ASafeBqbhpx)表服务实现类
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
@Service("aSafeBqbhpxService")
|
||||||
|
public class ASafeBqbhpxServiceImpl extends ServiceImpl<ASafeBqbhpxMapper, ASafeBqbhpx> implements ASafeBqbhpxService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.mudu.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.mudu.mapper.ASafeQyzypglMapper;
|
||||||
|
import com.mudu.entity.ASafeQyzypgl;
|
||||||
|
import com.mudu.service.ASafeQyzypglService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (ASafeQyzypgl)表服务实现类
|
||||||
|
*
|
||||||
|
* @author wu
|
||||||
|
* @since 2024-04-26 16:43:53
|
||||||
|
*/
|
||||||
|
@Service("aSafeQyzypglService")
|
||||||
|
public class ASafeQyzypglServiceImpl extends ServiceImpl<ASafeQyzypglMapper, ASafeQyzypgl> implements ASafeQyzypglService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in new issue