kangwei: 经营方案配置表、经营方案数据表
正在显示
17 个修改的文件
包含
668 行增加
和
1 行删除
1 | package com.skua.modules.common.vo; | ||
2 | |||
3 | import io.swagger.annotations.ApiModel; | ||
4 | import io.swagger.annotations.ApiModelProperty; | ||
5 | import lombok.Data; | ||
6 | |||
7 | import java.util.ArrayList; | ||
8 | import java.util.List; | ||
9 | |||
10 | /** | ||
11 | * @auther kangwei | ||
12 | * @create 2025-01-15-9:52 | ||
13 | */ | ||
14 | @Data | ||
15 | @ApiModel(value="树结构", description="树结构") | ||
16 | public class TreeNodeVO { | ||
17 | @ApiModelProperty(value = "节点编号") | ||
18 | private String id; | ||
19 | @ApiModelProperty(value = "上级节点编号") | ||
20 | private String parentId; | ||
21 | |||
22 | @ApiModelProperty(value = "节点名称") | ||
23 | private String label; | ||
24 | @ApiModelProperty(value = "是否叶子结点") | ||
25 | private boolean isLeaf; | ||
26 | |||
27 | @ApiModelProperty(value = "完成时间") | ||
28 | private String completeTime; | ||
29 | |||
30 | @ApiModelProperty(value = "负责人") | ||
31 | private String responsibler; | ||
32 | |||
33 | @ApiModelProperty(value = "子集合") | ||
34 | private List<TreeNodeVO> children = new ArrayList<>(); | ||
35 | |||
36 | public TreeNodeVO() { | ||
37 | } | ||
38 | |||
39 | public TreeNodeVO(String id, String parentId, String label) { | ||
40 | this.id = id; | ||
41 | this.parentId = parentId; | ||
42 | this.label = label; | ||
43 | } | ||
44 | |||
45 | public TreeNodeVO(String id, String parentId, String label, String completeTime, String responsibler) { | ||
46 | this.id = id; | ||
47 | this.parentId = parentId; | ||
48 | this.label = label; | ||
49 | this.completeTime = completeTime; | ||
50 | this.responsibler = responsibler; | ||
51 | } | ||
52 | |||
53 | public boolean isLeaf() { | ||
54 | isLeaf = true; | ||
55 | if(children != null && !children.isEmpty()){ | ||
56 | isLeaf = false; | ||
57 | } | ||
58 | return isLeaf; | ||
59 | } | ||
60 | |||
61 | public void addChild(TreeNodeVO child) { | ||
62 | this.children.add(child); | ||
63 | } | ||
64 | } |
1 | package com.skua.tool.util; | ||
2 | |||
3 | import com.skua.modules.common.vo.TreeNodeVO; | ||
4 | |||
5 | import java.util.ArrayList; | ||
6 | import java.util.List; | ||
7 | import java.util.Map; | ||
8 | import java.util.stream.Collectors; | ||
9 | |||
10 | /** | ||
11 | * @auther kangwei | ||
12 | * @create 2025-01-15-10:07 | ||
13 | */ | ||
14 | public class TreeBuilder { | ||
15 | //构建树结构 | ||
16 | public static List<TreeNodeVO> buildTree(List<TreeNodeVO> nodes) { | ||
17 | Map<String, TreeNodeVO> nodeMap = nodes.stream().collect(Collectors.toMap(TreeNodeVO::getId, node -> node)); | ||
18 | |||
19 | List<TreeNodeVO> roots = new ArrayList<>(); | ||
20 | TreeNodeVO parent = null; | ||
21 | for (TreeNodeVO node : nodes) { | ||
22 | parent = nodeMap.get(node.getParentId()); | ||
23 | if (parent != null) { | ||
24 | parent.addChild(node); | ||
25 | } else { | ||
26 | roots.add(node); | ||
27 | } | ||
28 | } | ||
29 | return roots; | ||
30 | } | ||
31 | } |
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhPlanScheduleConfigController.java
0 → 100644
此文件的差异被折叠,
点击展开。
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhPlanScheduleDataController.java
0 → 100644
此文件的差异被折叠,
点击展开。
1 | package com.skua.modules.ajh.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import io.swagger.annotations.ApiModel; | ||
10 | import io.swagger.annotations.ApiModelProperty; | ||
11 | import lombok.Data; | ||
12 | import lombok.EqualsAndHashCode; | ||
13 | import lombok.experimental.Accessors; | ||
14 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
15 | import org.springframework.format.annotation.DateTimeFormat; | ||
16 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
17 | |||
18 | /** | ||
19 | * 经营方案计划表 | ||
20 | */ | ||
21 | @Data | ||
22 | @TableName("ajh_plan_schedule_config") | ||
23 | @EqualsAndHashCode(callSuper = false) | ||
24 | @Accessors(chain = true) | ||
25 | @ApiModel(value="ajh_plan_schedule_config对象", description="经营方案计划表") | ||
26 | public class AjhPlanScheduleConfig { | ||
27 | |||
28 | /**id*/ | ||
29 | @TableId(type = IdType.ID_WORKER_STR) | ||
30 | @ApiModelProperty(value = "id") | ||
31 | private String id; | ||
32 | /**所属厂站*/ | ||
33 | @Excel(name = "所属厂站", width = 15) | ||
34 | @ApiModelProperty(value = "所属厂站") | ||
35 | private String factoryId; | ||
36 | /**上级编号*/ | ||
37 | @Excel(name = "上级编号", width = 15) | ||
38 | @ApiModelProperty(value = "上级编号") | ||
39 | private String parentId; | ||
40 | /**配置名称*/ | ||
41 | @Excel(name = "配置名称", width = 15) | ||
42 | @ApiModelProperty(value = "配置名称") | ||
43 | private String configName; | ||
44 | /**完成时间*/ | ||
45 | @Excel(name = "完成时间", width = 15) | ||
46 | @ApiModelProperty(value = "完成时间") | ||
47 | private String completeTime; | ||
48 | /**负责人*/ | ||
49 | @Excel(name = "负责人", width = 15) | ||
50 | @ApiModelProperty(value = "负责人") | ||
51 | private String responsibler; | ||
52 | /**排序序号*/ | ||
53 | @Excel(name = "排序序号", width = 15) | ||
54 | @ApiModelProperty(value = "排序序号") | ||
55 | private Integer sortNum; | ||
56 | /**备注*/ | ||
57 | @Excel(name = "备注", width = 15) | ||
58 | @ApiModelProperty(value = "备注") | ||
59 | private String remark; | ||
60 | /**创建人Id*/ | ||
61 | @Excel(name = "创建人Id", width = 15) | ||
62 | @ApiModelProperty(value = "创建人Id") | ||
63 | private String createBy; | ||
64 | /**创建时间*/ | ||
65 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
66 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
67 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
68 | @ApiModelProperty(value = "创建时间") | ||
69 | private Date createTime; | ||
70 | /**修改人Id*/ | ||
71 | @Excel(name = "修改人Id", width = 15) | ||
72 | @ApiModelProperty(value = "修改人Id") | ||
73 | private String updateBy; | ||
74 | /**修改时间*/ | ||
75 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
76 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
77 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
78 | @ApiModelProperty(value = "修改时间") | ||
79 | private Date updateTime; | ||
80 | } |
1 | package com.skua.modules.ajh.entity; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import io.swagger.annotations.ApiModel; | ||
10 | import io.swagger.annotations.ApiModelProperty; | ||
11 | import lombok.Data; | ||
12 | import lombok.EqualsAndHashCode; | ||
13 | import lombok.experimental.Accessors; | ||
14 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
15 | import org.springframework.format.annotation.DateTimeFormat; | ||
16 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
17 | |||
18 | /** | ||
19 | * 经营方案数据表 | ||
20 | */ | ||
21 | @Data | ||
22 | @TableName("ajh_plan_schedule_data") | ||
23 | @EqualsAndHashCode(callSuper = false) | ||
24 | @Accessors(chain = true) | ||
25 | @ApiModel(value="ajh_plan_schedule_data对象", description="经营方案数据表") | ||
26 | public class AjhPlanScheduleData { | ||
27 | |||
28 | /**id*/ | ||
29 | @TableId(type = IdType.ID_WORKER_STR) | ||
30 | @ApiModelProperty(value = "id") | ||
31 | private String id; | ||
32 | @Excel(name = "所属厂站", width = 15) | ||
33 | @ApiModelProperty(value = "所属厂站") | ||
34 | private String factoryId; | ||
35 | @ApiModelProperty(value = "时间yyyy-MM") | ||
36 | private String dateTime; | ||
37 | @ApiModelProperty(value = "一级指标编号") | ||
38 | private String configLevel1; | ||
39 | @ApiModelProperty(value = "二级指标编号") | ||
40 | private String configLevel2; | ||
41 | @ApiModelProperty(value = "三级指标编号") | ||
42 | private String configLevel3; | ||
43 | /**序时进度*/ | ||
44 | @Excel(name = "序时进度", width = 15) | ||
45 | @ApiModelProperty(value = "序时进度") | ||
46 | private String seqProgress; | ||
47 | /**控制成本*/ | ||
48 | @Excel(name = "控制成本", width = 15) | ||
49 | @ApiModelProperty(value = "控制成本") | ||
50 | private String controlCosts; | ||
51 | /**实际进度*/ | ||
52 | @Excel(name = "实际进度", width = 15) | ||
53 | @ApiModelProperty(value = "实际进度") | ||
54 | private String actualProgress; | ||
55 | /**实际成本*/ | ||
56 | @Excel(name = "实际成本", width = 15) | ||
57 | @ApiModelProperty(value = "实际成本") | ||
58 | private String actualCosts; | ||
59 | /**偏差原因*/ | ||
60 | @Excel(name = "偏差原因", width = 15) | ||
61 | @ApiModelProperty(value = "偏差原因") | ||
62 | private String deviationReason; | ||
63 | /**纠偏措施*/ | ||
64 | @Excel(name = "纠偏措施", width = 15) | ||
65 | @ApiModelProperty(value = "纠偏措施") | ||
66 | private String measures; | ||
67 | |||
68 | /**备注*/ | ||
69 | @Excel(name = "备注", width = 15) | ||
70 | @ApiModelProperty(value = "备注") | ||
71 | private String remark; | ||
72 | /**创建人Id*/ | ||
73 | @Excel(name = "创建人Id", width = 15) | ||
74 | @ApiModelProperty(value = "创建人Id") | ||
75 | private String createBy; | ||
76 | /**创建时间*/ | ||
77 | @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
78 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
79 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
80 | @ApiModelProperty(value = "创建时间") | ||
81 | private Date createTime; | ||
82 | /**修改人Id*/ | ||
83 | @Excel(name = "修改人Id", width = 15) | ||
84 | @ApiModelProperty(value = "修改人Id") | ||
85 | private String updateBy; | ||
86 | /**修改时间*/ | ||
87 | @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | ||
88 | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | ||
89 | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
90 | @ApiModelProperty(value = "修改时间") | ||
91 | private Date updateTime; | ||
92 | } |
1 | package com.skua.modules.ajh.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import org.apache.ibatis.annotations.Param; | ||
6 | import com.skua.modules.ajh.entity.AjhPlanScheduleConfig; | ||
7 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
8 | |||
9 | /** | ||
10 | * 经营方案计划表 | ||
11 | */ | ||
12 | public interface AjhPlanScheduleConfigMapper extends BaseMapper<AjhPlanScheduleConfig> { | ||
13 | |||
14 | } |
1 | package com.skua.modules.ajh.mapper; | ||
2 | |||
3 | import java.util.List; | ||
4 | |||
5 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
6 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
7 | import com.baomidou.mybatisplus.core.toolkit.Constants; | ||
8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
9 | import com.skua.modules.ajh.vo.AjhPlanScheduleDataVO; | ||
10 | import org.apache.ibatis.annotations.Delete; | ||
11 | import org.apache.ibatis.annotations.Param; | ||
12 | import com.skua.modules.ajh.entity.AjhPlanScheduleData; | ||
13 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
14 | import org.apache.ibatis.annotations.Select; | ||
15 | |||
16 | /** | ||
17 | * 经营方案数据表 | ||
18 | */ | ||
19 | public interface AjhPlanScheduleDataMapper extends BaseMapper<AjhPlanScheduleData> { | ||
20 | |||
21 | @Select("select d.depart_name , s1.config_name 'workItermName', s2.config_name 'workContent' ,s1.complete_time 'complete_time1',s1.responsibler 'responsibler1' ,s2.complete_time 'complete_time2',s2.responsibler 'responsibler12',sd.* " + | ||
22 | " from ajh_plan_schedule_data sd " + | ||
23 | " left join ajh_plan_schedule_config s1 on s1.id = sd.config_level1 " + | ||
24 | " left join ajh_plan_schedule_config s2 on s2.id = sd.config_level2 " + | ||
25 | " left join sys_depart d on sd.factory_id = d.id ${ew.customSqlSegment}") | ||
26 | IPage<AjhPlanScheduleDataVO> queryPageList(Page page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); | ||
27 | |||
28 | |||
29 | @Select("select d.depart_name , s1.config_name 'workItermName', s2.config_name 'workContent' ,s1.complete_time 'complete_time1',s1.responsibler 'responsibler1' ,s2.complete_time 'complete_time2',s2.responsibler 'responsibler12',sd.* " + | ||
30 | " from ajh_plan_schedule_data sd " + | ||
31 | " left join ajh_plan_schedule_config s1 on s1.id = sd.config_level1 " + | ||
32 | " left join ajh_plan_schedule_config s2 on s2.id = sd.config_level2 " + | ||
33 | " left join sys_depart d on sd.factory_id = d.id ${ew.customSqlSegment}") | ||
34 | List<AjhPlanScheduleDataVO> queryByList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); | ||
35 | |||
36 | void delById(@Param("factoryId") String factoryId, @Param("dateTime")String dateTime); | ||
37 | } |
sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhPlanScheduleConfigMapper.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | <mapper namespace="com.skua.modules.ajh.mapper.AjhPlanScheduleConfigMapper"> | ||
4 | |||
5 | </mapper> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhPlanScheduleDataMapper.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | <mapper namespace="com.skua.modules.ajh.mapper.AjhPlanScheduleDataMapper"> | ||
4 | |||
5 | |||
6 | |||
7 | <delete id="delById"> | ||
8 | delete from ajh_plan_schedule_data where factory_id=#{factoryId} and date_time = #{dateTime} | ||
9 | </delete> | ||
10 | |||
11 | |||
12 | </mapper> |
sk-module-biz/src/main/java/com/skua/modules/ajh/service/IAjhPlanScheduleConfigService.java
0 → 100644
1 | package com.skua.modules.ajh.service; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.skua.modules.ajh.entity.AjhPlanScheduleConfig; | ||
5 | import com.baomidou.mybatisplus.extension.service.IService; | ||
6 | import com.skua.modules.common.vo.TreeNodeVO; | ||
7 | import java.util.List; | ||
8 | |||
9 | |||
10 | /** | ||
11 | * 经营方案计划表 | ||
12 | */ | ||
13 | public interface IAjhPlanScheduleConfigService extends IService<AjhPlanScheduleConfig> { | ||
14 | |||
15 | |||
16 | /*** | ||
17 | * 列表查询 | ||
18 | * @param factoryId | ||
19 | * @return | ||
20 | */ | ||
21 | List<TreeNodeVO> queryTreeList(String factoryId); | ||
22 | } |
sk-module-biz/src/main/java/com/skua/modules/ajh/service/IAjhPlanScheduleDataService.java
0 → 100644
1 | package com.skua.modules.ajh.service; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.core.toolkit.Constants; | ||
6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | import com.skua.modules.ajh.entity.AjhPlanScheduleData; | ||
8 | import com.baomidou.mybatisplus.extension.service.IService; | ||
9 | import com.skua.modules.ajh.vo.AjhPlanScheduleDataVO; | ||
10 | import org.apache.ibatis.annotations.Param; | ||
11 | |||
12 | import java.util.List; | ||
13 | import java.util.Map; | ||
14 | |||
15 | /** | ||
16 | * 经营方案数据表 | ||
17 | */ | ||
18 | public interface IAjhPlanScheduleDataService extends IService<AjhPlanScheduleData> { | ||
19 | /*** | ||
20 | * 分页检索 | ||
21 | * @param page | ||
22 | * @param queryWrapper | ||
23 | * @return | ||
24 | */ | ||
25 | IPage<AjhPlanScheduleDataVO> queryPageList(Page page, QueryWrapper queryWrapper); | ||
26 | |||
27 | /*** | ||
28 | * 列表查询 | ||
29 | * @param queryWrapper | ||
30 | * @return | ||
31 | */ | ||
32 | List<AjhPlanScheduleDataVO> queryByList(QueryWrapper queryWrapper); | ||
33 | |||
34 | |||
35 | /*** | ||
36 | * | ||
37 | * @param factoryId | ||
38 | * @param dateTime | ||
39 | */ | ||
40 | void delById(String factoryId ,String dateTime ); | ||
41 | |||
42 | } |
sk-module-biz/src/main/java/com/skua/modules/ajh/service/impl/AjhPlanScheduleConfigServiceImpl.java
0 → 100644
1 | package com.skua.modules.ajh.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.skua.modules.ajh.entity.AjhPlanScheduleConfig; | ||
5 | import com.skua.modules.ajh.mapper.AjhPlanScheduleConfigMapper; | ||
6 | import com.skua.modules.ajh.service.IAjhPlanScheduleConfigService; | ||
7 | import com.skua.modules.common.vo.TreeNodeVO; | ||
8 | import com.skua.tool.util.TreeBuilder; | ||
9 | import org.springframework.stereotype.Service; | ||
10 | |||
11 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
12 | |||
13 | import java.util.ArrayList; | ||
14 | import java.util.List; | ||
15 | |||
16 | /** | ||
17 | * 经营方案计划表 | ||
18 | */ | ||
19 | @Service | ||
20 | public class AjhPlanScheduleConfigServiceImpl extends ServiceImpl<AjhPlanScheduleConfigMapper, AjhPlanScheduleConfig> implements IAjhPlanScheduleConfigService { | ||
21 | |||
22 | /*** | ||
23 | * 列表查询 | ||
24 | * @param factoryId | ||
25 | * @return | ||
26 | */ | ||
27 | public List<TreeNodeVO> queryTreeList(String factoryId){ | ||
28 | QueryWrapper<AjhPlanScheduleConfig> queryConfigWrapper = new QueryWrapper(); | ||
29 | queryConfigWrapper.eq("factory_id", factoryId); | ||
30 | List<AjhPlanScheduleConfig> configList = this.baseMapper.selectList( queryConfigWrapper); | ||
31 | List<TreeNodeVO> treeList = new ArrayList<TreeNodeVO>(); | ||
32 | if(configList != null && !configList.isEmpty()){ | ||
33 | for(AjhPlanScheduleConfig config : configList){ | ||
34 | //String id, String parentId, String label, String completeTime, String responsibler | ||
35 | treeList.add( new TreeNodeVO(config.getId(),config.getParentId(),config.getConfigName(),config.getCompleteTime(),config.getResponsibler())); | ||
36 | } | ||
37 | treeList = TreeBuilder.buildTree(treeList); | ||
38 | } | ||
39 | return treeList; | ||
40 | } | ||
41 | |||
42 | } |
sk-module-biz/src/main/java/com/skua/modules/ajh/service/impl/AjhPlanScheduleDataServiceImpl.java
0 → 100644
1 | package com.skua.modules.ajh.service.impl; | ||
2 | |||
3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
4 | import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
6 | import com.skua.modules.ajh.entity.AjhPlanScheduleData; | ||
7 | import com.skua.modules.ajh.mapper.AjhPlanScheduleDataMapper; | ||
8 | import com.skua.modules.ajh.service.IAjhPlanScheduleDataService; | ||
9 | import com.skua.modules.ajh.vo.AjhPlanScheduleDataVO; | ||
10 | import org.springframework.stereotype.Service; | ||
11 | |||
12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
13 | |||
14 | import java.util.List; | ||
15 | |||
16 | /** | ||
17 | * 经营方案数据表 | ||
18 | */ | ||
19 | @Service | ||
20 | public class AjhPlanScheduleDataServiceImpl extends ServiceImpl<AjhPlanScheduleDataMapper, AjhPlanScheduleData> implements IAjhPlanScheduleDataService { | ||
21 | |||
22 | /*** | ||
23 | * 分页检索 | ||
24 | * @param page | ||
25 | * @param queryWrapper | ||
26 | * @return | ||
27 | */ | ||
28 | public IPage<AjhPlanScheduleDataVO> queryPageList(Page page, QueryWrapper queryWrapper){ | ||
29 | return this.baseMapper.queryPageList(page,queryWrapper); | ||
30 | } | ||
31 | |||
32 | /*** | ||
33 | * 列表查询 | ||
34 | * @param queryWrapper | ||
35 | * @return | ||
36 | */ | ||
37 | public List<AjhPlanScheduleDataVO> queryByList(QueryWrapper queryWrapper){ | ||
38 | return this.baseMapper.queryByList(queryWrapper); | ||
39 | } | ||
40 | /*** | ||
41 | * 删除记录 | ||
42 | * @param factoryId | ||
43 | * @param dateTime | ||
44 | */ | ||
45 | public void delById(String factoryId ,String dateTime ){ | ||
46 | this.baseMapper.delById(factoryId , dateTime); | ||
47 | } | ||
48 | } |
... | @@ -175,6 +175,7 @@ public class AjhRectificationInfoServiceImpl extends ServiceImpl<AjhRectificatio | ... | @@ -175,6 +175,7 @@ public class AjhRectificationInfoServiceImpl extends ServiceImpl<AjhRectificatio |
175 | throw new JeecgBootException("实体不存在!"); | 175 | throw new JeecgBootException("实体不存在!"); |
176 | } | 176 | } |
177 | BeanUtils.copyProperties(dto, updateParam); | 177 | BeanUtils.copyProperties(dto, updateParam); |
178 | |||
178 | updateParam.setHandleResult(DicRectificationInfoHandleResultEnums.HANDLED.getItemValue()); | 179 | updateParam.setHandleResult(DicRectificationInfoHandleResultEnums.HANDLED.getItemValue()); |
179 | this.updateById(updateParam); | 180 | this.updateById(updateParam); |
180 | 181 | ... | ... |
1 | package com.skua.modules.ajh.vo; | ||
2 | |||
3 | import java.io.Serializable; | ||
4 | import java.util.Date; | ||
5 | import com.baomidou.mybatisplus.annotation.IdType; | ||
6 | import com.baomidou.mybatisplus.annotation.TableId; | ||
7 | import com.baomidou.mybatisplus.annotation.TableName; | ||
8 | import com.baomidou.mybatisplus.annotation.TableField; | ||
9 | import io.swagger.annotations.ApiModel; | ||
10 | import io.swagger.annotations.ApiModelProperty; | ||
11 | import lombok.Data; | ||
12 | import lombok.EqualsAndHashCode; | ||
13 | import lombok.experimental.Accessors; | ||
14 | import com.fasterxml.jackson.annotation.JsonFormat; | ||
15 | import org.apache.commons.lang3.StringUtils; | ||
16 | import org.springframework.format.annotation.DateTimeFormat; | ||
17 | import org.jeecgframework.poi.excel.annotation.Excel; | ||
18 | |||
19 | /** | ||
20 | * 经营方案数据表 | ||
21 | */ | ||
22 | @Data | ||
23 | @ApiModel(value="ajh_plan_schedule_data数据传输对象", description="经营方案数据表") | ||
24 | public class AjhPlanScheduleDataVO { | ||
25 | |||
26 | |||
27 | /**id*/ | ||
28 | @TableId(type = IdType.ID_WORKER_STR) | ||
29 | @ApiModelProperty(value = "id") | ||
30 | private String id; | ||
31 | @Excel(name = "所属厂站", width = 15) | ||
32 | @ApiModelProperty(value = "所属厂站") | ||
33 | private String factoryId; | ||
34 | |||
35 | @ApiModelProperty(value = "所属厂站名称") | ||
36 | private String departName; | ||
37 | @ApiModelProperty(value = "时间yyyy-MM") | ||
38 | private String dateTime; | ||
39 | |||
40 | @ApiModelProperty(value = "工作事项") | ||
41 | private String workItermName; | ||
42 | @ApiModelProperty(value = "具体内容") | ||
43 | private String workContent; | ||
44 | |||
45 | |||
46 | @ApiModelProperty(value = "一级指标编号") | ||
47 | private String configLevel1; | ||
48 | @ApiModelProperty(value = "二级指标编号") | ||
49 | private String configLevel2; | ||
50 | |||
51 | |||
52 | @ApiModelProperty(value = "一级指标-完成时间") | ||
53 | private String completeTime1; | ||
54 | @ApiModelProperty(value = "一级指标-责任人") | ||
55 | private String responsibler1; | ||
56 | @ApiModelProperty(value = "二级指标-完成时间") | ||
57 | private String completeTime2; | ||
58 | @ApiModelProperty(value = "二级指标-责任人") | ||
59 | private String responsibler2; | ||
60 | |||
61 | @ApiModelProperty(value = "完成时间") | ||
62 | private String completeTime; | ||
63 | /**负责人*/ | ||
64 | @Excel(name = "负责人", width = 15) | ||
65 | @ApiModelProperty(value = "负责人") | ||
66 | private String responsibler; | ||
67 | |||
68 | |||
69 | /**序时进度*/ | ||
70 | @Excel(name = "序时进度", width = 15) | ||
71 | @ApiModelProperty(value = "序时进度") | ||
72 | private String seqProgress; | ||
73 | /**控制成本*/ | ||
74 | @Excel(name = "控制成本", width = 15) | ||
75 | @ApiModelProperty(value = "控制成本") | ||
76 | private String controlCosts; | ||
77 | /**实际进度*/ | ||
78 | @Excel(name = "实际进度", width = 15) | ||
79 | @ApiModelProperty(value = "实际进度") | ||
80 | private String actualProgress; | ||
81 | /**实际成本*/ | ||
82 | @Excel(name = "实际成本", width = 15) | ||
83 | @ApiModelProperty(value = "实际成本") | ||
84 | private String actualCosts; | ||
85 | /**偏差原因*/ | ||
86 | @Excel(name = "偏差原因", width = 15) | ||
87 | @ApiModelProperty(value = "偏差原因") | ||
88 | private String deviationReason; | ||
89 | /**纠偏措施*/ | ||
90 | @Excel(name = "纠偏措施", width = 15) | ||
91 | @ApiModelProperty(value = "纠偏措施") | ||
92 | private String measures; | ||
93 | |||
94 | /**备注*/ | ||
95 | @Excel(name = "备注", width = 15) | ||
96 | @ApiModelProperty(value = "备注") | ||
97 | private String remark; | ||
98 | |||
99 | public AjhPlanScheduleDataVO() { | ||
100 | } | ||
101 | |||
102 | public AjhPlanScheduleDataVO(String factoryId,String workItermName, String workContent,String configLevel1, String completeTime1, String responsibler1, String configLevel2,String completeTime2, String responsibler2) { | ||
103 | this.factoryId = factoryId; | ||
104 | this.workItermName = workItermName; | ||
105 | this.workContent = workContent; | ||
106 | |||
107 | this.configLevel1 = configLevel1; | ||
108 | this.completeTime1 = completeTime1; | ||
109 | this.responsibler1 = responsibler1; | ||
110 | |||
111 | this.configLevel2 = configLevel2; | ||
112 | this.completeTime2 = completeTime2; | ||
113 | this.responsibler2 = responsibler2; | ||
114 | } | ||
115 | |||
116 | public AjhPlanScheduleDataVO(String factoryId,String workItermName,String configLevel1, String completeTime1, String responsibler1) { | ||
117 | this.factoryId = factoryId; | ||
118 | this.workItermName = workItermName; | ||
119 | this.workContent = workContent; | ||
120 | |||
121 | this.configLevel1 = configLevel1; | ||
122 | this.completeTime1 = completeTime1; | ||
123 | this.responsibler1 = responsibler1; | ||
124 | |||
125 | |||
126 | } | ||
127 | |||
128 | |||
129 | public String getCompleteTime() { | ||
130 | completeTime = completeTime1; | ||
131 | if(StringUtils.isNotEmpty(completeTime2)){ | ||
132 | completeTime = completeTime2; | ||
133 | } | ||
134 | return completeTime; | ||
135 | } | ||
136 | |||
137 | public String getResponsibler() { | ||
138 | responsibler = responsibler1; | ||
139 | if(StringUtils.isNotEmpty(responsibler2)){ | ||
140 | responsibler = responsibler2; | ||
141 | } | ||
142 | return responsibler; | ||
143 | } | ||
144 | } |
... | @@ -8,6 +8,8 @@ import java.io.UnsupportedEncodingException; | ... | @@ -8,6 +8,8 @@ import java.io.UnsupportedEncodingException; |
8 | import java.net.URLDecoder; | 8 | import java.net.URLDecoder; |
9 | import javax.servlet.http.HttpServletRequest; | 9 | import javax.servlet.http.HttpServletRequest; |
10 | import javax.servlet.http.HttpServletResponse; | 10 | import javax.servlet.http.HttpServletResponse; |
11 | |||
12 | import com.google.common.collect.Lists; | ||
11 | import com.skua.core.api.vo.Result; | 13 | import com.skua.core.api.vo.Result; |
12 | import com.skua.core.aspect.annotation.AutoLog; | 14 | import com.skua.core.aspect.annotation.AutoLog; |
13 | import com.skua.core.context.BaseContextHandler; | 15 | import com.skua.core.context.BaseContextHandler; |
... | @@ -83,18 +85,49 @@ public class ErpProblemController { | ... | @@ -83,18 +85,49 @@ public class ErpProblemController { |
83 | String endTime = req.getParameter("endTime"); | 85 | String endTime = req.getParameter("endTime"); |
84 | if (StringUtils.isNotEmpty(startTime)) { | 86 | if (StringUtils.isNotEmpty(startTime)) { |
85 | queryWrapper.ge("report_date", startTime+" 00:00:00"); | 87 | queryWrapper.ge("report_date", startTime+" 00:00:00"); |
86 | |||
87 | } | 88 | } |
88 | if (StringUtils.isNotEmpty(endTime)) { | 89 | if (StringUtils.isNotEmpty(endTime)) { |
89 | queryWrapper.le("report_date", endTime+" 23:59:59"); | 90 | queryWrapper.le("report_date", endTime+" 23:59:59"); |
90 | } | 91 | } |
92 | //queryWrapper.in("alarm_rule_type", Lists.newArrayList("1", "2", "3", "5", "8")); | ||
93 | if(erpProblem.getHandleStatus() != null){//0:未提交,1:待处理,2退回,3已处理,4 关闭 | ||
94 | queryWrapper.in("handle_status",Lists.newArrayList("0","1", "2", "3", "4")); | ||
95 | } | ||
96 | |||
91 | queryWrapper.orderByDesc("create_time"); | 97 | queryWrapper.orderByDesc("create_time"); |
92 | IPage<ErpProblem> pageList = erpProblemService.page(page, queryWrapper); | 98 | IPage<ErpProblem> pageList = erpProblemService.page(page, queryWrapper); |
93 | result.setSuccess(true); | 99 | result.setSuccess(true); |
94 | result.setResult(pageList); | 100 | result.setResult(pageList); |
95 | return result; | 101 | return result; |
96 | } | 102 | } |
103 | @AutoLog(value = "ERP-数据问题上报-审批列表") | ||
104 | @ApiOperation(value="ERP-数据问题上报-审批列表", notes="数据问题上报-审批列表") | ||
105 | @GetMapping(value = "/handleList") | ||
106 | public Result<IPage<ErpProblem>> handleList(ErpProblem erpProblem, | ||
107 | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | ||
108 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | ||
109 | HttpServletRequest req) { | ||
110 | Result<IPage<ErpProblem>> result = new Result<IPage<ErpProblem>>(); | ||
111 | QueryWrapper<ErpProblem> queryWrapper = QueryGenerator.initQueryWrapper(erpProblem, req.getParameterMap()); | ||
112 | Page<ErpProblem> page = new Page<ErpProblem>(pageNo, pageSize); | ||
97 | 113 | ||
114 | String startTime = req.getParameter("startTime"); | ||
115 | String endTime = req.getParameter("endTime"); | ||
116 | if (StringUtils.isNotEmpty(startTime)) { | ||
117 | queryWrapper.ge("report_date", startTime+" 00:00:00"); | ||
118 | } | ||
119 | if (StringUtils.isNotEmpty(endTime)) { | ||
120 | queryWrapper.le("report_date", endTime+" 23:59:59"); | ||
121 | } | ||
122 | if(erpProblem.getHandleStatus() != null){//0:未提交,1:待处理,2退回,3已处理,4 关闭 | ||
123 | queryWrapper.in("handle_status",Lists.newArrayList("1")); | ||
124 | } | ||
125 | queryWrapper.orderByDesc("create_time"); | ||
126 | IPage<ErpProblem> pageList = erpProblemService.page(page, queryWrapper); | ||
127 | result.setSuccess(true); | ||
128 | result.setResult(pageList); | ||
129 | return result; | ||
130 | } | ||
98 | /** | 131 | /** |
99 | * <pre> | 132 | * <pre> |
100 | * 添加 | 133 | * 添加 | ... | ... |
-
请 注册 或 登录 后发表评论