Compare commits
12 Commits
1b86125114
...
dev_2026-0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0317f8596e | ||
|
|
1116444f09 | ||
|
|
aa4e6ad673 | ||
| 6e9bdfd81c | |||
| 6871480945 | |||
| de990a6f3f | |||
|
|
5316629d5f | ||
|
|
73addd6656 | ||
| d6f4d0bb51 | |||
| eb410b992d | |||
|
|
c8d6c52438 | ||
|
|
bac64da6d8 |
@@ -2,8 +2,8 @@ spring:
|
||||
application:
|
||||
name: lideeyunji-server
|
||||
profiles:
|
||||
active: local # 读取配置
|
||||
# active: prod # 读取配置
|
||||
# active: local # 读取配置
|
||||
active: prod # 读取配置
|
||||
main:
|
||||
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
|
||||
|
||||
@@ -214,7 +214,7 @@ aj:
|
||||
cache-number: 1000 # local 缓存的阈值,达到这个值,清除缓存
|
||||
timing-clear: 180 # local定时清除过期缓存(单位秒),设置为0代表不执行
|
||||
type: blockPuzzle # 验证码类型 default两种都实例化。 blockPuzzle 滑块拼图 clickWord 文字点选
|
||||
water-mark: LideeYunJi # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode
|
||||
water-mark: # 右下角水印文字(我的水印),可使用 https://tool.chinaz.com/tools/unicode.aspx 中文转 Unicode,Linux 可能需要转 unicode
|
||||
interference-options: 0 # 滑动干扰项(0/1/2)
|
||||
req-frequency-limit-enable: false # 接口请求次数一分钟限制是否开启 true|false
|
||||
req-get-lock-limit: 5 # 验证失败 5 次,get接口锁定
|
||||
|
||||
@@ -80,6 +80,18 @@ public class DbFormEnhanceController extends BaseController {
|
||||
return BaseWebResult.success("成功");
|
||||
}
|
||||
|
||||
//处理增强
|
||||
@PreAuthorize("@ss.hasPermission('lideeyunji:java')")
|
||||
@PutMapping("/java/handle")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(tags = "JAVA增强",summary = "处理操作")
|
||||
public BaseWebResult javaHandle(@RequestBody EnhanceJavaEntity model) {
|
||||
javaService.handleEnhanceJava(model);
|
||||
return BaseWebResult.success("成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermission('lideeyunji:java')")
|
||||
@DeleteMapping("/java/delete")
|
||||
@ApiOperationSupport(order = 4)
|
||||
|
||||
@@ -53,9 +53,8 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" current_year_data.dosage_id, \n");
|
||||
executePluginSql.append(" current_year_data.dosage_name as dosagename, \n");
|
||||
}
|
||||
if (params.containsKey("goodsname")) { //货品名称
|
||||
executePluginSql.append(" current_year_data.goods_id, \n");
|
||||
executePluginSql.append(" current_year_data.goods_name as goodsname, \n");
|
||||
if (groupFieldList.contains("stdGoodsName") || params.containsKey("stdGoodsName")) { //标准品名
|
||||
executePluginSql.append(" current_year_data.std_goods_name as stdGoodsName, \n");
|
||||
}
|
||||
executePluginSql.append(" GROUP_CONCAT(DISTINCT current_year_data.province_id ORDER BY current_year_data.province_id SEPARATOR ',') as province_id, \n"); //行政区域ID
|
||||
executePluginSql.append(" GROUP_CONCAT(DISTINCT current_year_data.province_name ORDER BY current_year_data.province_name SEPARATOR ',') as province_name, \n"); //行政区域名称
|
||||
@@ -126,12 +125,12 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" FROM \n");
|
||||
executePluginSql.append(" new_gr_bi_sa_agg_year_count as current_year_data \n");
|
||||
executePluginSql.append(" LEFT JOIN (SELECT use_year, \n");
|
||||
executePluginSql.append(" goods_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" std_goods_name, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" saler_id, \n");
|
||||
executePluginSql.append(" SUM(this_year_sa_qty) AS last_year_sa_qty, \n");
|
||||
executePluginSql.append(" SUM(this_year_sa_money) AS last_year_sa_money, \n");
|
||||
@@ -139,14 +138,14 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" SUM(this_year_profit) AS last_year_profit \n");
|
||||
executePluginSql.append(" FROM new_gr_bi_sa_agg_year_count \n");
|
||||
executePluginSql.append(" GROUP BY use_year, \n");
|
||||
executePluginSql.append(" goods_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" std_goods_name, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" saler_id) AS last_year_data \n");
|
||||
executePluginSql.append(" ON current_year_data.goods_id = last_year_data.goods_id \n");
|
||||
executePluginSql.append(" ON current_year_data.std_goods_name = last_year_data.std_goods_name \n");
|
||||
executePluginSql.append(" AND current_year_data.zone_id = last_year_data.zone_id \n");
|
||||
executePluginSql.append(" AND current_year_data.province_id = last_year_data.province_id \n");
|
||||
executePluginSql.append(" AND current_year_data.sale_type_id = last_year_data.sale_type_id \n");
|
||||
@@ -189,9 +188,8 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" current_year_data.dosage_id,");
|
||||
executePluginSql.append(" current_year_data.dosage_name,");
|
||||
}
|
||||
if (params.containsKey("goodsname")) { //货品名称
|
||||
executePluginSql.append(" current_year_data.goods_id,");
|
||||
executePluginSql.append(" current_year_data.goods_name,");
|
||||
if (groupFieldList.contains("stdGoodsName") || params.containsKey("stdGoodsName")) { //标准品名
|
||||
executePluginSql.append(" current_year_data.std_goods_name,");
|
||||
}
|
||||
|
||||
executePluginSql.deleteCharAt(executePluginSql.length() - 1);
|
||||
@@ -235,9 +233,8 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" current_month.dosage_id, \n");
|
||||
executePluginSql.append(" current_month.dosage_name as dosagename, \n");
|
||||
}
|
||||
if (params.containsKey("goodsname")) { //货品名称
|
||||
executePluginSql.append(" current_month.goods_id, \n");
|
||||
executePluginSql.append(" current_month.goods_name as goodsname, \n");
|
||||
if (groupFieldList.contains("stdGoodsName") || params.containsKey("stdGoodsName")) { //标准品名
|
||||
executePluginSql.append(" current_month.std_goods_name as stdGoodsName, \n");
|
||||
}
|
||||
executePluginSql.append(" SUM(current_month.this_month_sa_qty) as thisMonthSaQty, "); //本月销售数量(件)
|
||||
executePluginSql.append(" ROUND(SUM(current_month.this_month_sa_money) / 10000, 2) as thisMonthSaMoney, "); //本月销售金额(元)
|
||||
@@ -316,12 +313,12 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" LEFT JOIN (SELECT \n");
|
||||
executePluginSql.append(" use_year, \n");
|
||||
executePluginSql.append(" use_month, \n");
|
||||
executePluginSql.append(" goods_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" std_goods_name, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" saler_id, \n");
|
||||
executePluginSql.append(" SUM(this_month_sa_qty) AS last_month_sa_qty, \n");
|
||||
executePluginSql.append(" SUM(this_month_sa_money) AS last_month_sa_money, \n");
|
||||
@@ -330,14 +327,14 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" FROM new_gr_bi_sa_agg_month_count \n");
|
||||
executePluginSql.append(" GROUP BY use_year, \n");
|
||||
executePluginSql.append(" use_month, \n");
|
||||
executePluginSql.append(" goods_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" std_goods_name, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" saler_id) AS last_month_data \n");
|
||||
executePluginSql.append(" ON current_month.goods_id = last_month_data.goods_id \n");
|
||||
executePluginSql.append(" ON current_month.std_goods_name = last_month_data.std_goods_name \n");
|
||||
executePluginSql.append(" AND current_month.zone_id = last_month_data.zone_id \n");
|
||||
executePluginSql.append(" AND current_month.province_id = last_month_data.province_id \n");
|
||||
executePluginSql.append(" AND current_month.sale_type_id = last_month_data.sale_type_id \n");
|
||||
@@ -348,12 +345,12 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" AND last_month_data.use_month = IF(current_month.use_month = 1, 12, current_month.use_month - 1)\n");
|
||||
executePluginSql.append(" LEFT JOIN (SELECT use_year, \n");
|
||||
executePluginSql.append(" use_month, \n");
|
||||
executePluginSql.append(" goods_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" std_goods_name, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" saler_id, \n");
|
||||
executePluginSql.append(" SUM(this_month_sa_qty) AS yoy_month_sa_qty, \n"); // 同比月销量
|
||||
executePluginSql.append(" SUM(this_month_sa_money) AS yoy_month_sa_money, \n"); // 同比月销售金额
|
||||
@@ -365,15 +362,15 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
// }
|
||||
executePluginSql.append(" GROUP BY use_year, \n");
|
||||
executePluginSql.append(" use_month, \n");
|
||||
executePluginSql.append(" goods_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" custom_id, \n");
|
||||
executePluginSql.append(" zone_id, \n");
|
||||
executePluginSql.append(" std_goods_name, \n");
|
||||
executePluginSql.append(" province_id, \n");
|
||||
executePluginSql.append(" sale_type_id, \n");
|
||||
executePluginSql.append(" dosage_id, \n");
|
||||
executePluginSql.append(" saler_id) yoy_month ON yoy_month.use_year = current_month.use_year - 1 \n");
|
||||
executePluginSql.append(" AND yoy_month.use_month = current_month.use_month \n");
|
||||
executePluginSql.append(" AND yoy_month.goods_id = current_month.goods_id \n");
|
||||
executePluginSql.append(" AND yoy_month.std_goods_name = current_month.std_goods_name \n");
|
||||
executePluginSql.append(" AND yoy_month.zone_id = current_month.zone_id \n");
|
||||
executePluginSql.append(" AND yoy_month.province_id = current_month.province_id \n");
|
||||
executePluginSql.append(" AND yoy_month.sale_type_id = current_month.sale_type_id \n");
|
||||
@@ -427,9 +424,8 @@ public class zhxsqkLineReportEnhance implements ReportBeforeAdvicePlugin {
|
||||
executePluginSql.append(" current_month.dosage_id,");
|
||||
executePluginSql.append(" current_month.dosage_name,");
|
||||
}
|
||||
if (params.containsKey("goodsname")) { //货品名称
|
||||
executePluginSql.append(" current_month.goods_id,");
|
||||
executePluginSql.append(" current_month.goods_name,");
|
||||
if (groupFieldList.contains("stdGoodsName") || params.containsKey("stdGoodsName")) { //标准品名
|
||||
executePluginSql.append(" current_month.std_goods_name,");
|
||||
}
|
||||
|
||||
executePluginSql.deleteCharAt(executePluginSql.length() - 1);
|
||||
|
||||
@@ -69,6 +69,9 @@ public class NewGrBiSaAgg implements Serializable
|
||||
@TableField(value = "goods_name")
|
||||
private String goodsName;
|
||||
|
||||
@TableField(value = "std_goods_name")
|
||||
private String stdGoodsName;
|
||||
|
||||
|
||||
@TableField(value = "province_id")
|
||||
private Long provinceId;
|
||||
|
||||
@@ -61,13 +61,8 @@ public class NewGrBiSaAggMonthCount implements Serializable
|
||||
@TableField(value = "dosage_name")
|
||||
private String dosageName;
|
||||
|
||||
|
||||
@TableField(value = "goods_id")
|
||||
private Long goodsId;
|
||||
|
||||
|
||||
@TableField(value = "goods_name")
|
||||
private String goodsName;
|
||||
@TableField(value = "std_goods_name")
|
||||
private String stdGoodsName;
|
||||
|
||||
|
||||
@TableField(value = "province_id")
|
||||
|
||||
@@ -58,12 +58,8 @@ public class NewGrBiSaAggYearCount implements Serializable
|
||||
private String dosageName;
|
||||
|
||||
|
||||
@TableField(value = "goods_id")
|
||||
private Long goodsId;
|
||||
|
||||
|
||||
@TableField(value = "goods_name")
|
||||
private String goodsName;
|
||||
@TableField(value = "std_goods_name")
|
||||
private String stdGoodsName;
|
||||
|
||||
|
||||
@TableField(value = "province_id")
|
||||
|
||||
@@ -39,6 +39,7 @@ public interface NewGrBiSaAggMapper extends BaseMapper<NewGrBiSaAgg>
|
||||
// void updateThisYearData();
|
||||
//
|
||||
// void updateLastYearData();
|
||||
//批量明细的 月度数据
|
||||
void updateLastMonthSamoney();
|
||||
void updateYoyMonthData();
|
||||
|
||||
|
||||
@@ -27,4 +27,6 @@ public interface IEnhanceJavaService extends IService<EnhanceJavaEntity> {
|
||||
|
||||
//批量删除
|
||||
void removeByIds(List<Long> ids);
|
||||
//处理操作
|
||||
void handleEnhanceJava(EnhanceJavaEntity model);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,12 @@ public class EnhanceJavaServiceImpl extends ServiceImpl<EnhanceJavaMapper, Enhan
|
||||
|
||||
this.saveHistoryLog(enhanceJavaEntity.getId(),enhanceJavaEntity);
|
||||
}
|
||||
|
||||
@DSTransactional(rollbackFor = Exception.class)
|
||||
@lideeYunjiCache(cacheNames = lideeRedisConstants.REDIS_DBFORM +":*",delCache = true)
|
||||
@Override
|
||||
public void handleEnhanceJava(EnhanceJavaEntity enhanceJavaEntity) {
|
||||
this.updateById(enhanceJavaEntity);
|
||||
}
|
||||
|
||||
@DS(lideeYunJiBaseConstant.DS_lideeyunji)
|
||||
@Override
|
||||
@@ -159,4 +164,6 @@ public class EnhanceJavaServiceImpl extends ServiceImpl<EnhanceJavaMapper, Enhan
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -35,27 +35,27 @@ public class GrNhServiceImpl extends ServiceImpl<GrNhMapper, GrNhEntity> impleme
|
||||
@Override
|
||||
@DSTransactional
|
||||
public Integer deltetNH(GrNhEntity grNhEntity) {
|
||||
GrNhEntity old = baseMapper.selectOne(new Wrapper<GrNhEntity>() {
|
||||
@Override
|
||||
public GrNhEntity getEntity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MergeSegments getExpression() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSqlSegment() {
|
||||
return "";
|
||||
}
|
||||
}).setAddTime(new Date());
|
||||
// GrNhEntity old = baseMapper.selectOne(new Wrapper<GrNhEntity>() {
|
||||
// @Override
|
||||
// public GrNhEntity getEntity() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public MergeSegments getExpression() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void clear() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getSqlSegment() {
|
||||
// return "";
|
||||
// }
|
||||
// }).setAddTime(new Date());
|
||||
int re = this.baseMapper.deltetNH(lideeYunJiBaseConstant.DS_ERP_BI_DATA, grNhEntity);
|
||||
return re;
|
||||
}
|
||||
@@ -65,27 +65,27 @@ public class GrNhServiceImpl extends ServiceImpl<GrNhMapper, GrNhEntity> impleme
|
||||
@Override
|
||||
@DSTransactional
|
||||
public Integer saveNH(GrNhEntity grNhEntity) {
|
||||
GrNhEntity old = baseMapper.selectOne(new Wrapper<GrNhEntity>() {
|
||||
@Override
|
||||
public GrNhEntity getEntity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MergeSegments getExpression() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSqlSegment() {
|
||||
return "";
|
||||
}
|
||||
}).setAddTime(new Date());
|
||||
// GrNhEntity old = baseMapper.selectOne(new Wrapper<GrNhEntity>() {
|
||||
// @Override
|
||||
// public GrNhEntity getEntity() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public MergeSegments getExpression() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void clear() {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getSqlSegment() {
|
||||
// return "";
|
||||
// }
|
||||
// }).setAddTime(new Date());
|
||||
int re = this.baseMapper.save(lideeYunJiBaseConstant.DS_ERP_BI_DATA, grNhEntity);
|
||||
return re;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
a.USEMONTH as use_month,
|
||||
goods.goodsid as goods_id,
|
||||
goods.GOODSNAME as goods_name,
|
||||
goods.STDGOODSNAME as std_goods_name,
|
||||
sales.SALEZONEID as zone_id,
|
||||
sales.SALEZONENAME as zone_name,
|
||||
province.PROVINCEID as province_id,
|
||||
@@ -124,8 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
custom_name,
|
||||
dosage_id,
|
||||
dosage_name,
|
||||
goods_id,
|
||||
goods_name,
|
||||
std_goods_name,
|
||||
province_id,
|
||||
province_name,
|
||||
saler_id,
|
||||
@@ -145,8 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
custom_name,
|
||||
dosage_id,
|
||||
dosage_name,
|
||||
goods_id,
|
||||
goods_name,
|
||||
std_goods_name,
|
||||
province_id,
|
||||
province_name,
|
||||
saler_id,
|
||||
@@ -169,8 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
custom_name,
|
||||
dosage_id,
|
||||
dosage_name,
|
||||
goods_id,
|
||||
goods_name,
|
||||
std_goods_name,
|
||||
province_id,
|
||||
province_name,
|
||||
saler_id,
|
||||
@@ -189,8 +187,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
custom_name,
|
||||
dosage_id,
|
||||
dosage_name,
|
||||
goods_id,
|
||||
goods_name,
|
||||
std_goods_name,
|
||||
province_id,
|
||||
province_name,
|
||||
saler_id,
|
||||
@@ -209,8 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
custom_name,
|
||||
dosage_id,
|
||||
dosage_name,
|
||||
goods_id,
|
||||
goods_name,
|
||||
std_goods_name,
|
||||
province_id,
|
||||
province_name,
|
||||
saler_id,
|
||||
@@ -232,8 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
custom_name,
|
||||
dosage_id,
|
||||
dosage_name,
|
||||
goods_id,
|
||||
goods_name,
|
||||
std_goods_name,
|
||||
province_id,
|
||||
province_name,
|
||||
saler_id,
|
||||
|
||||
@@ -16,8 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="customName" column="custom_name" />
|
||||
<result property="dosageId" column="dosage_id" />
|
||||
<result property="dosageName" column="dosage_name" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="stdGoodsName" column="std_goods_name" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="provinceName" column="province_name" />
|
||||
<result property="salerId" column="saler_id" />
|
||||
@@ -42,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNewGrBiSaAggMonthCountVo">
|
||||
select id, use_year, use_month, zone_id, zone_name, sale_type_id, sale_type_name, custom_id, custom_name, dosage_id, dosage_name, goods_id, goods_name, province_id, province_name, saler_id, saler_name, this_month_sa_qty, last_month_sa_qty, yoy_month_sa_qty, this_month_sa_money, last_month_sa_money, yoy_month_sa_money, this_month_profit, last_month_profit, yoy_month_profit, this_month_cost, last_month_cost, yoy_month_cost, this_month_profit_rate, last_month_profit_rate, last_month_profit_share, this_month_sa_money_share, this_month_profit_share from new_gr_bi_sa_agg_month_count
|
||||
select id, use_year, use_month, zone_id, zone_name, sale_type_id, sale_type_name, custom_id, custom_name, dosage_id, dosage_name, goods_id, std_goods_name, province_id, province_name, saler_id, saler_name, this_month_sa_qty, last_month_sa_qty, yoy_month_sa_qty, this_month_sa_money, last_month_sa_money, yoy_month_sa_money, this_month_profit, last_month_profit, yoy_month_profit, this_month_cost, last_month_cost, yoy_month_cost, this_month_profit_rate, last_month_profit_rate, last_month_profit_share, this_month_sa_money_share, this_month_profit_share from new_gr_bi_sa_agg_month_count
|
||||
</sql>
|
||||
|
||||
<select id="selectNewGrBiSaAggMonthCountList" parameterType="com.lideeyunji.core.framework.entity.NewGrBiSaAggMonthCount" resultMap="NewGrBiSaAggMonthCountResult">
|
||||
@@ -58,8 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null and customName != ''"> and custom_name like concat('%', #{customName}, '%')</if>
|
||||
<if test="dosageId != null "> and dosage_id = #{dosageId}</if>
|
||||
<if test="dosageName != null and dosageName != ''"> and dosage_name like concat('%', #{dosageName}, '%')</if>
|
||||
<if test="goodsId != null "> and goods_id = #{goodsId}</if>
|
||||
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
|
||||
<if test="stdGoodsName != null and stdGoodsName != ''"> and std_goods_name like concat('%', #{stdGoodsName}, '%')</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="provinceName != null and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
|
||||
<if test="salerId != null "> and saler_id = #{salerId}</if>
|
||||
@@ -102,8 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null">custom_name,</if>
|
||||
<if test="dosageId != null">dosage_id,</if>
|
||||
<if test="dosageName != null">dosage_name,</if>
|
||||
<if test="goodsId != null">goods_id,</if>
|
||||
<if test="goodsName != null">goods_name,</if>
|
||||
<if test="stdGoodsName != null">std_goods_name,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="provinceName != null">province_name,</if>
|
||||
<if test="salerId != null">saler_id,</if>
|
||||
@@ -137,8 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null">#{customName},</if>
|
||||
<if test="dosageId != null">#{dosageId},</if>
|
||||
<if test="dosageName != null">#{dosageName},</if>
|
||||
<if test="goodsId != null">#{goodsId},</if>
|
||||
<if test="goodsName != null">#{goodsName},</if>
|
||||
<if test="stdGoodsName != null">#{stdGoodsName},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="provinceName != null">#{provinceName},</if>
|
||||
<if test="salerId != null">#{salerId},</if>
|
||||
@@ -176,8 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null">custom_name = #{customName},</if>
|
||||
<if test="dosageId != null">dosage_id = #{dosageId},</if>
|
||||
<if test="dosageName != null">dosage_name = #{dosageName},</if>
|
||||
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
||||
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
||||
<if test="stdGoodsName != null">std_goods_name = #{stdGoodsName},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="provinceName != null">province_name = #{provinceName},</if>
|
||||
<if test="salerId != null">saler_id = #{salerId},</if>
|
||||
|
||||
@@ -15,8 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="customName" column="custom_name" />
|
||||
<result property="dosageId" column="dosage_id" />
|
||||
<result property="dosageName" column="dosage_name" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="stdGoodsName" column="std_goods_name" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="provinceName" column="province_name" />
|
||||
<result property="salerId" column="saler_id" />
|
||||
@@ -41,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNewGrBiSaAggYearCountVo">
|
||||
select id, use_year, zone_id, zone_name, sale_type_id, sale_type_name, custom_id, custom_name, dosage_id, dosage_name, goods_id, goods_name, province_id, province_name, saler_id, saler_name, this_year_sa_qty, last_year_sa_qty, this_year_sa_money, last_year_sa_money, this_year_profit, last_year_profit, this_year_cost, last_year_cost, this_year_profit_rate, last_year_profit_rate, this_year_profit_share, last_year_profit_share, this_year_sa_money_share, last_year_sa_money_share, this_year_sa_money_growth, this_year_profit_growth, this_year_profit_change from new_gr_bi_sa_agg_year_count
|
||||
select id, use_year, zone_id, zone_name, sale_type_id, sale_type_name, custom_id, custom_name, dosage_id, dosage_name, std_goods_name, province_id, province_name, saler_id, saler_name, this_year_sa_qty, last_year_sa_qty, this_year_sa_money, last_year_sa_money, this_year_profit, last_year_profit, this_year_cost, last_year_cost, this_year_profit_rate, last_year_profit_rate, this_year_profit_share, last_year_profit_share, this_year_sa_money_share, last_year_sa_money_share, this_year_sa_money_growth, this_year_profit_growth, this_year_profit_change from new_gr_bi_sa_agg_year_count
|
||||
</sql>
|
||||
|
||||
<select id="selectNewGrBiSaAggYearCountList" parameterType="com.lideeyunji.core.framework.entity.NewGrBiSaAggYearCount" resultMap="NewGrBiSaAggYearCountResult">
|
||||
@@ -56,8 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null and customName != ''"> and custom_name like concat('%', #{customName}, '%')</if>
|
||||
<if test="dosageId != null "> and dosage_id = #{dosageId}</if>
|
||||
<if test="dosageName != null and dosageName != ''"> and dosage_name like concat('%', #{dosageName}, '%')</if>
|
||||
<if test="goodsId != null "> and goods_id = #{goodsId}</if>
|
||||
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
|
||||
<if test="stdGoodsName != null and stdGoodsName != ''"> and std_goods_name like concat('%', #{stdGoodsName}, '%')</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="provinceName != null and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
|
||||
<if test="salerId != null "> and saler_id = #{salerId}</if>
|
||||
@@ -99,8 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null">custom_name,</if>
|
||||
<if test="dosageId != null">dosage_id,</if>
|
||||
<if test="dosageName != null">dosage_name,</if>
|
||||
<if test="goodsId != null">goods_id,</if>
|
||||
<if test="goodsName != null">goods_name,</if>
|
||||
<if test="stdGoodsName != null">std_goods_name,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="provinceName != null">province_name,</if>
|
||||
<if test="salerId != null">saler_id,</if>
|
||||
@@ -134,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="dosageId != null">#{dosageId},</if>
|
||||
<if test="dosageName != null">#{dosageName},</if>
|
||||
<if test="goodsId != null">#{goodsId},</if>
|
||||
<if test="goodsName != null">#{goodsName},</if>
|
||||
<if test="stdGoodsName != null">#{stdGoodsName},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="provinceName != null">#{provinceName},</if>
|
||||
<if test="salerId != null">#{salerId},</if>
|
||||
@@ -171,8 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customName != null">custom_name = #{customName},</if>
|
||||
<if test="dosageId != null">dosage_id = #{dosageId},</if>
|
||||
<if test="dosageName != null">dosage_name = #{dosageName},</if>
|
||||
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
||||
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
||||
<if test="stdGoodsName != null">std_goods_name = #{stdGoodsName},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="provinceName != null">province_name = #{provinceName},</if>
|
||||
<if test="salerId != null">saler_id = #{salerId},</if>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
package com.lideeyunji.module.biz.controller;
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.service.DevGzbxService;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import com.lideeyunji.tool.framework.common.pojo.CommonResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static com.lideeyunji.tool.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @author DX
|
||||
* @create 2026-03-3 11:59
|
||||
* @dedescription:
|
||||
*/
|
||||
@Tag(name = "设备故障维修")
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping(lideeYunJiBaseConstant.REQUEST_URL_START +"/gzbx")
|
||||
public class DevGzbxController {
|
||||
|
||||
@Resource
|
||||
private DevGzbxService devGzbxService;
|
||||
|
||||
@PutMapping("/updateStatus")
|
||||
@Operation(tags = "故障报修",summary = "故障报修状态修改")
|
||||
public CommonResult<Boolean> updateConfig(@Valid @RequestBody DevGzbxDO devGzbxDO) {
|
||||
devGzbxService.updateDevgGzbx(devGzbxDO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.lideeyunji.module.biz.controller;
|
||||
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevArchivesEntity;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.service.EquipmentArchivesService;
|
||||
import com.lideeyunji.module.biz.vo.DevArchivesVo;
|
||||
import com.lideeyunji.tool.framework.common.constant.lideeYunJiBaseConstant;
|
||||
import com.lideeyunji.tool.framework.common.pojo.CommonResult;
|
||||
import com.lideeyunji.tool.framework.sql.core.toolkit.CollectionUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.mapstruct.ap.internal.util.Collections;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static com.lideeyunji.tool.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @author DX
|
||||
* @create 2026-03-3 11:59
|
||||
* @dedescription:
|
||||
*/
|
||||
@Tag(name = "设备档案控制器")
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping(lideeYunJiBaseConstant.REQUEST_URL_START +"/dev")
|
||||
public class EquipmentArchivesController {
|
||||
|
||||
@Resource
|
||||
private EquipmentArchivesService equipmentArchivesService;
|
||||
|
||||
|
||||
@GetMapping("/selectByType/{devType}")
|
||||
@Operation(summary = "根据设备类型获取设备档案")
|
||||
public CommonResult<List<DevArchivesEntity>> getByDeviceType(@Valid @PathVariable("devType") String devType) {
|
||||
List<DevArchivesEntity> devArchives = equipmentArchivesService.selectByType(devType);
|
||||
if (CollectionUtils.isEmpty(devArchives)) {
|
||||
return CommonResult.error(400,"未找到对应设备类型的档案");
|
||||
}
|
||||
return success(devArchives);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
package com.lideeyunji.module.biz.controller;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.module.biz.entity.*;
|
||||
import com.lideeyunji.module.biz.mapper.*;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.AcceptanceStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.ProcessingStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 设备报修-环绕
|
||||
*/
|
||||
@Component("EquipmentMalfunctionCheck")
|
||||
public class EquipmentMalfunctionCheck implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
||||
@Resource
|
||||
private DevGzbxMapper devGzbxMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "id");
|
||||
DevGzbxWxgdDO yorn = devGzbxWxgdMapper.selectOne("id",id);
|
||||
yorn.setProcessingStatus(ProcessingStatusEnum.ACCEPTED.getType());
|
||||
yorn.setDevStatus(AcceptanceStatusEnum.COMPLETED.getType());
|
||||
yorn.setCompletionTime(new Date());
|
||||
yorn.setAcceptanceTime(new Date());
|
||||
DevGzbxDO devGzbxDO = devGzbxMapper.selectOne("id", yorn.getGzbxId());
|
||||
devGzbxDO.setProcessingStatus(AcceptanceStatusEnum.COMPLETED.getType());
|
||||
devGzbxWxgdMapper.updateById(yorn);
|
||||
devGzbxMapper.updateById(devGzbxDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
|
||||
package com.lideeyunji.module.biz.controller;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxfaDO;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxfaMapper;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 设备报修方案-环绕
|
||||
*/
|
||||
@Component("equipmentMalfunctionOrder")
|
||||
public class EquipmentMalfunctionOrder implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private DevGzbxWxfaMapper devGzbxWxfaMapper;
|
||||
@Resource
|
||||
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
||||
@Resource
|
||||
private DevGzbxMapper devGzbxMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
Long status = lideeYunJiUtils.getMap2Long(params, "dev_status");
|
||||
Long gzbx_id = lideeYunJiUtils.getMap2Long(params, "gzbx_id");
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "gzbx_id");
|
||||
DevGzbxWxfaDO yorn = devGzbxWxfaMapper.selectById(id);
|
||||
if (status == 2) {
|
||||
if (yorn == null) {
|
||||
DevGzbxWxfaDO devGzbxWxfaDO = new DevGzbxWxfaDO();
|
||||
devGzbxWxfaDO.setDevStatus(2);
|
||||
devGzbxWxfaDO.setGzbxId(gzbx_id);
|
||||
devGzbxWxfaMapper.insertOrUpdate(devGzbxWxfaDO);
|
||||
} else {
|
||||
yorn.setDevStatus(2);
|
||||
devGzbxWxfaMapper.insertOrUpdate(yorn);
|
||||
DevGzbxWxgdDO devGzbxWxgdDO = devGzbxWxgdMapper.selectOne("gzbx_id", gzbx_id);
|
||||
devGzbxWxgdDO.setDevStatus(2);
|
||||
devGzbxWxgdMapper.updateBatch(devGzbxWxgdDO);
|
||||
DevGzbxDO devGzbxDO = devGzbxMapper.selectById(gzbx_id);
|
||||
devGzbxDO.setDevStatus(2);
|
||||
devGzbxMapper.insertOrUpdate(devGzbxDO);
|
||||
}
|
||||
} else if (status == 0) {
|
||||
if (!(yorn == null)) {
|
||||
DevGzbxWxfaDO devGzbxWxfaDO = devGzbxWxfaMapper.selectOne("gzbx_id", gzbx_id);
|
||||
devGzbxWxfaDO.setDevStatus(0);
|
||||
devGzbxWxfaMapper.updateBatch(devGzbxWxfaDO);
|
||||
DevGzbxDO devGzbxDO = devGzbxMapper.selectById(gzbx_id);
|
||||
devGzbxDO.setDevStatus(0);
|
||||
devGzbxMapper.insertOrUpdate(devGzbxDO);
|
||||
} else {
|
||||
DevGzbxDO devGzbxDO = devGzbxMapper.selectById(gzbx_id);
|
||||
devGzbxDO.setDevStatus(0);
|
||||
devGzbxMapper.insertOrUpdate(devGzbxDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
|
||||
package com.lideeyunji.module.biz.controller;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxfaDO;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxfaMapper;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 维修方案-java增强
|
||||
*/
|
||||
@Component("equipmentMalfunctionRecord")
|
||||
public class EquipmentMalfunctionRecord implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private DevGzbxWxfaMapper devGzbxWxfaMapper;
|
||||
@Resource
|
||||
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
|
||||
String submitType = lideeYunJiUtils.getMap2Str(params, "submitType");
|
||||
if (!"ys".equals(submitType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "id");
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxWxfaDO devGzbxWxfaDO = devGzbxWxfaMapper.selectOne("id", id);
|
||||
if (devGzbxWxfaDO == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
devGzbxWxfaDO.setDevStatus(1);
|
||||
devGzbxWxfaMapper.updateById(devGzbxWxfaDO);
|
||||
|
||||
Long gzbxId = devGzbxWxfaDO.getGzbxId();
|
||||
if (gzbxId == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxWxgdDO devGzbxWxgdDO = devGzbxWxgdMapper.selectOne("id", gzbxId);
|
||||
if (devGzbxWxgdDO != null) {
|
||||
devGzbxWxgdDO.setDevStatus(2);
|
||||
devGzbxWxgdMapper.updateById(devGzbxWxgdDO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
|
||||
package com.lideeyunji.module.biz.controller;
|
||||
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.core.framework.mapper.AdapterMapper;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
||||
import com.lideeyunji.tool.framework.security.core.LoginUser;
|
||||
import com.lideeyunji.tool.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.AcceptanceStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.ProcessingStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import jodd.util.StringUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 设备报修工单-环绕
|
||||
*/
|
||||
@Component("equipmentMalfunctionRepair")
|
||||
public class EquipmentMalfunctionRepair implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
||||
|
||||
@Resource
|
||||
private DevGzbxMapper devGzbxMapper;
|
||||
|
||||
@Resource
|
||||
private AdapterMapper adapterMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
|
||||
String submitType = lideeYunJiUtils.getMap2Str(params, "submitType");
|
||||
if (!"ys".equals(submitType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "id");
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxWxgdDO existingRecord = devGzbxWxgdMapper.selectOne("gzbx_id", id);
|
||||
if (existingRecord != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxDO gzbxDO = devGzbxMapper.selectOne("id", id);
|
||||
if (gzbxDO == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxWxgdDO newRecord = new DevGzbxWxgdDO();
|
||||
BeanUtils.copyProperties(gzbxDO, newRecord);
|
||||
newRecord.setId(null);
|
||||
newRecord.setGzbxId(id);
|
||||
newRecord.setFaultType(gzbxDO.getType());
|
||||
newRecord.setFaultRemark(gzbxDO.getRemark());
|
||||
newRecord.setNumber(generateFaultNumber(params));
|
||||
newRecord.setCreateUserName(gzbxDO.getCreateUserName());
|
||||
devGzbxWxgdMapper.insert(newRecord);
|
||||
gzbxDO.setProcessingStatus(AcceptanceStatusEnum.TREATED.getType());
|
||||
devGzbxMapper.updateById(gzbxDO);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
}
|
||||
|
||||
private String generateFaultNumber(Map<String, Object> params) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||
return "GD" + LocalDateTime.now().format(formatter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.lideeyunji.module.biz.controller.maintenance;
|
||||
|
||||
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.core.framework.mapper.AdapterMapper;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
||||
import com.lideeyunji.tool.framework.security.core.LoginUser;
|
||||
import com.lideeyunji.tool.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import jodd.util.StringUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 故障报修-新增-java增强
|
||||
*/
|
||||
@Component("AddFMaintenanceOrderFunctionRecord")
|
||||
public class AddFMaintenanceOrderFunctionRecord implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private DevGzbxMapper devGzbxMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private AdapterMapper adapterMapper;
|
||||
|
||||
@Override
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
String faultNumber = generateFaultNumber(params);
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "id");
|
||||
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return;
|
||||
}
|
||||
Long userId = loginUser.getId();
|
||||
|
||||
DevGzbxDO devGzbxDO = new DevGzbxDO();
|
||||
devGzbxDO.setId(id);
|
||||
devGzbxDO.setFaultNumber(faultNumber);
|
||||
devGzbxDO.setReporter(userId);
|
||||
devGzbxDO.setCreateUserName(adapterMapper.getNickname(userId));
|
||||
devGzbxMapper.updateById(devGzbxDO);
|
||||
}
|
||||
|
||||
private String generateFaultNumber(Map<String, Object> params) {
|
||||
String faultNumber = lideeYunJiUtils.getMap2Str(params, "fault_number");
|
||||
if (StringUtil.isBlank(faultNumber)) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||
return "GZ" + LocalDateTime.now().format(formatter);
|
||||
}
|
||||
return faultNumber;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.lideeyunji.module.biz.controller.maintenance;
|
||||
|
||||
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.core.framework.mapper.AdapterMapper;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
||||
import com.lideeyunji.tool.framework.security.core.LoginUser;
|
||||
import com.lideeyunji.tool.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.ProcessingStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import jodd.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 故障报修-新增-java增强
|
||||
*/
|
||||
@Component("AddFaultFeportingFunctionRecord")
|
||||
public class AddFaultReportingFunctionRecord implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private DevGzbxMapper devGzbxMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private AdapterMapper adapterMapper;
|
||||
|
||||
@Override
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
String faultNumber = generateFaultNumber(params);
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "id");
|
||||
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
return;
|
||||
}
|
||||
Long userId = loginUser.getId();
|
||||
|
||||
DevGzbxDO devGzbxDO = new DevGzbxDO();
|
||||
devGzbxDO.setId(id);
|
||||
devGzbxDO.setFaultNumber(faultNumber);
|
||||
devGzbxDO.setReporter(userId);
|
||||
devGzbxDO.setCreateUserName(adapterMapper.getNickname(userId));
|
||||
devGzbxMapper.updateById(devGzbxDO);
|
||||
}
|
||||
|
||||
private String generateFaultNumber(Map<String, Object> params) {
|
||||
String faultNumber = lideeYunJiUtils.getMap2Str(params, "number");
|
||||
if (StringUtil.isBlank(faultNumber)) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||
return "GZ" + LocalDateTime.now().format(formatter);
|
||||
}
|
||||
return faultNumber;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.lideeyunji.module.biz.controller.maintenance;
|
||||
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.module.biz.mapper.EquipmentArchivesMapper;
|
||||
import com.lideeyunji.tool.framework.sql.core.toolkit.StringUtils;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 设备档案-java增强
|
||||
*/
|
||||
@Component("EquipmentArchivesFunctionRecord")
|
||||
public class EquipmentArchivesFunctionRecord implements AroundAdvicePlugin {
|
||||
|
||||
@Resource
|
||||
private EquipmentArchivesMapper equipmentArchivesMapper;
|
||||
|
||||
@Override
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
String decCode = lideeYunJiUtils.getMap2Str(params, "dev_code");
|
||||
if (StringUtils.isBlank(decCode)) {
|
||||
String newDevCode = generateFaultNumber();
|
||||
params.put("dev_code", newDevCode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
}
|
||||
|
||||
private String generateFaultNumber() {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||
return "SB" + LocalDateTime.now().format(formatter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.lideeyunji.module.biz.controller.maintenance;
|
||||
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.model.EnhanceContext;
|
||||
import com.lideeyunji.core.framework.config.aspect.enhance.plugin.AroundAdvicePlugin;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxfaDO;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxfaMapper;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxWxgdMapper;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.AcceptanceStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.enums.ProcessingStatusEnum;
|
||||
import com.lideeyunji.tool.framework.yunji.utils.lideeYunJiUtils;
|
||||
import jodd.util.StringUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 设备报修工单-环绕
|
||||
*/
|
||||
@Component("FaultRepairFunctionRecord")
|
||||
public class FaultRepairFunctionRecord implements AroundAdvicePlugin {
|
||||
@Resource
|
||||
private DevGzbxWxfaMapper devGzbxWxfaMapper;
|
||||
|
||||
@Resource
|
||||
private DevGzbxWxgdMapper devGzbxWxgdMapper;
|
||||
|
||||
// @Resource
|
||||
@Override
|
||||
public void beforeExecute(EnhanceContext enhanceContext) {
|
||||
Map<String, Object> params = enhanceContext.getParam().getParams();
|
||||
|
||||
String submitType = lideeYunJiUtils.getMap2Str(params, "submitType");
|
||||
if (!"ys".equals(submitType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Long id = lideeYunJiUtils.getMap2Long(params, "id");
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxWxfaDO existingRecord = devGzbxWxfaMapper.selectOne("gzbx_id", id);
|
||||
if (existingRecord != null) {
|
||||
return;
|
||||
}
|
||||
DevGzbxWxgdDO wxgdDO = devGzbxWxgdMapper.selectOne("id", id);
|
||||
if (wxgdDO == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
DevGzbxWxfaDO newRecord = new DevGzbxWxfaDO();
|
||||
BeanUtils.copyProperties(wxgdDO, newRecord);
|
||||
newRecord.setId(null);
|
||||
newRecord.setGzbxId(id);
|
||||
newRecord.setDevStatus(0);
|
||||
newRecord.setCreateTime(new Date());
|
||||
newRecord.setNumber(generateFaultNumber(params));
|
||||
devGzbxWxfaMapper.insert(newRecord);
|
||||
wxgdDO.setDevStatus(AcceptanceStatusEnum.TREATED.getType());
|
||||
wxgdDO.setProcessingStatus(null);
|
||||
devGzbxWxgdMapper.updateById(wxgdDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterExecute(EnhanceContext enhanceContext) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private String generateFaultNumber(Map<String, Object> params) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
||||
return "FA" + LocalDateTime.now().format(formatter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.lideeyunji.module.biz.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备档案-实体类
|
||||
*
|
||||
* @author duanxiang
|
||||
*/
|
||||
@TableName(value = "sys_device", autoResultMap = true)
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DevArchivesEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String devCode;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String devName;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String devXh;
|
||||
|
||||
/**
|
||||
* 设备部门
|
||||
*/
|
||||
private String devDept;
|
||||
|
||||
/**
|
||||
* 设备所属单位
|
||||
*/
|
||||
private String devZzdw;
|
||||
|
||||
/**
|
||||
* 设备出厂日期
|
||||
*/
|
||||
private Date devCcrq;
|
||||
|
||||
/**
|
||||
* 设备启用日期
|
||||
*/
|
||||
private Date devQyrq;
|
||||
|
||||
/**
|
||||
* 设备功率/管理
|
||||
*/
|
||||
private String devGl;
|
||||
|
||||
/**
|
||||
* 设备安装位置
|
||||
*/
|
||||
private String devAzwz;
|
||||
|
||||
/**
|
||||
* 设备固定资产编码
|
||||
*/
|
||||
private String devGdzcbm;
|
||||
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
private String devTp;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 逻辑删除标志(0-未删除,1-已删除)
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package com.lideeyunji.module.biz.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.lideeyunji.tool.framework.tenant.core.db.TenantBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 故障保修 DO
|
||||
*
|
||||
* @author duanxiang
|
||||
*/
|
||||
@TableName(value = "dev_gzbx", autoResultMap = true)
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DevGzbxDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@TableField("tenant_id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 故障编号
|
||||
*/
|
||||
@TableField("fault_number")
|
||||
private String faultNumber;
|
||||
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@TableField("dev_type")
|
||||
private Integer devType;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("dev_name")
|
||||
private String devName;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("dev_no")
|
||||
private String devNo;
|
||||
|
||||
/**
|
||||
* 故障类型(0-硬件故障 1-软件故障 2-网络故障 3-其他)
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 故障备注/描述
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 故障级别(严重/高/中/低)
|
||||
*/
|
||||
@TableField("level")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 是否停机(0-否 1-是)
|
||||
*/
|
||||
@TableField("is_stop")
|
||||
private Integer isStop;
|
||||
|
||||
/**
|
||||
* 上报人ID
|
||||
*/
|
||||
@TableField("reporter")
|
||||
private Long reporter;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@TableField("phone_number")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("create_user")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建部门ID
|
||||
*/
|
||||
@TableField("create_dept")
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableField("is_deleted")
|
||||
@TableLogic
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 设备状态(0-正常 1-异常 2-维护中 3-已报废)
|
||||
*/
|
||||
@TableField("dev_status")
|
||||
private Integer devStatus;
|
||||
|
||||
/**
|
||||
* 处理状态(0-待处理 1-处理中 2-已处理 3-已关闭)
|
||||
*/
|
||||
@TableField("processing_status")
|
||||
private Integer processingStatus;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("create_user_name")
|
||||
private String createUserName;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.lideeyunji.module.biz.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 维修方案 DO
|
||||
*
|
||||
* @author duanxiang
|
||||
*/
|
||||
@TableName(value = "dev_gzbx_wxfa", autoResultMap = true)
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DevGzbxWxfaDO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 逻辑删除标志(0-正常,1-已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(select = false)
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 设备类型(0-电脑,1-打印机,2-网络设备,3-其他)
|
||||
*/
|
||||
private Integer devType;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String devName;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String devNo;
|
||||
|
||||
/**
|
||||
* 故障类型(0-硬件故障,1-软件故障,2-网络故障,3-其他)
|
||||
*/
|
||||
private Integer faultType;
|
||||
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String faultRemark;
|
||||
|
||||
/**
|
||||
* 设备状态(0-正常,1-故障,2-维修中,3-已报废)
|
||||
*/
|
||||
private Integer devStatus;
|
||||
|
||||
/**
|
||||
* 工单报修ID
|
||||
*/
|
||||
private Long gzbxId;
|
||||
|
||||
/**
|
||||
* 处理状态(0-待处理,1-处理中,2-已完成,3-已关闭)
|
||||
*/
|
||||
private Integer processingStatus;
|
||||
|
||||
/**
|
||||
* 姓名/联系人
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 号码/联系电话
|
||||
*/
|
||||
private String number;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.lideeyunji.module.biz.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import static com.lideeyunji.tool.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
import static com.lideeyunji.tool.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
|
||||
|
||||
/**
|
||||
* 维修故障 DO
|
||||
*
|
||||
* @author duanxiang
|
||||
*/
|
||||
@TableName(value = "dev_gzbx_wxgd", autoResultMap = true)
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class DevGzbxWxgdDO {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 故障报修ID
|
||||
*/
|
||||
@TableField("gzbx_id")
|
||||
private Long gzbxId;
|
||||
|
||||
/**
|
||||
* 删除标志(0-未删除 1-已删除)
|
||||
*/
|
||||
@TableField("is_deleted")
|
||||
@TableLogic
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 创建部门ID
|
||||
*/
|
||||
@TableField("create_dept")
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("create_user")
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@TableField("tenant_id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 处理状态(0-待处理 1-处理中 2-已处理 3-已关闭)
|
||||
*/
|
||||
@TableField("processing_status")
|
||||
private Integer processingStatus;
|
||||
|
||||
/**
|
||||
* 故障名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 故障类型
|
||||
*/
|
||||
@TableField("fault_type")
|
||||
private Integer faultType;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField("dev_no")
|
||||
private String devNo;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("dev_name")
|
||||
private String devName;
|
||||
|
||||
/**
|
||||
* 优先级(
|
||||
*/
|
||||
@TableField("priority")
|
||||
private String priority;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
@TableField("number")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* 故障备注/描述
|
||||
*/
|
||||
@TableField("fault_remark")
|
||||
private String faultRemark;
|
||||
|
||||
/**
|
||||
* 设备类型(
|
||||
*/
|
||||
@TableField("dev_type")
|
||||
private Integer devType;
|
||||
|
||||
/**
|
||||
* 维修人员ID
|
||||
*/
|
||||
@TableField("maintenance_person")
|
||||
private Long maintenancePerson;
|
||||
|
||||
/**
|
||||
* 是否停机(0-否 1-是)
|
||||
*/
|
||||
@TableField("is_top")
|
||||
private Integer isTop;
|
||||
|
||||
/**
|
||||
* 是否备案(0-否 1-是)
|
||||
*/
|
||||
@TableField("is_filing")
|
||||
private Integer isFiling;
|
||||
|
||||
/**
|
||||
* 上报人ID
|
||||
*/
|
||||
@TableField("reporter")
|
||||
private Long reporter;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@TableField("phone_number")
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 设备状态
|
||||
*/
|
||||
@TableField("dev_status")
|
||||
private Integer devStatus;
|
||||
/**
|
||||
* 严重级别
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private Date completionTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private Date acceptanceTime;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("create_user_name")
|
||||
private String createUserName;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
package com.lideeyunji.module.biz.mapper;
|
||||
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.tool.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* demo相关
|
||||
*/
|
||||
@Mapper
|
||||
public interface DevGzbxMapper extends BaseMapperX<DevGzbxDO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
package com.lideeyunji.module.biz.mapper;
|
||||
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxfaDO;
|
||||
import com.lideeyunji.tool.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* demo相关
|
||||
*/
|
||||
@Mapper
|
||||
public interface DevGzbxWxfaMapper extends BaseMapperX<DevGzbxWxfaDO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
package com.lideeyunji.module.biz.mapper;
|
||||
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxWxgdDO;
|
||||
import com.lideeyunji.tool.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* demo相关
|
||||
*/
|
||||
@Mapper
|
||||
public interface DevGzbxWxgdMapper extends BaseMapperX<DevGzbxWxgdDO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
package com.lideeyunji.module.biz.mapper;
|
||||
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevArchivesEntity;
|
||||
import com.lideeyunji.tool.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设备档案
|
||||
*/
|
||||
@Mapper
|
||||
public interface EquipmentArchivesMapper extends BaseMapperX<DevArchivesEntity> {
|
||||
|
||||
DevArchivesEntity selectByType(@Param("devType")String devType);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.lideeyunji.module.biz.service;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 故障报修 Service 接口
|
||||
*
|
||||
* @author dx
|
||||
*/
|
||||
public interface DevGzbxService {
|
||||
|
||||
/**
|
||||
* 创建故障报修
|
||||
*
|
||||
* @param devGzbxDO 修改报修状态
|
||||
* @return 配置编号
|
||||
*/
|
||||
void updateDevgGzbx(@Valid DevGzbxDO devGzbxDO);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.lideeyunji.module.biz.service;
|
||||
|
||||
import com.lideeyunji.module.biz.entity.DevArchivesEntity;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
public interface EquipmentArchivesService
|
||||
{
|
||||
List<DevArchivesEntity> selectByType(@Valid String devType);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.lideeyunji.module.biz.service.impl;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.lideeyunji.module.biz.entity.DevGzbxDO;
|
||||
import com.lideeyunji.module.biz.mapper.DevGzbxMapper;
|
||||
import com.lideeyunji.module.biz.service.DevGzbxService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
/**
|
||||
* 参数配置 Service 实现类
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
@Validated
|
||||
public class DevGzbxServiceImpl implements DevGzbxService {
|
||||
|
||||
@Resource
|
||||
private DevGzbxMapper devGzbxMapper;
|
||||
|
||||
@Override
|
||||
public void updateDevgGzbx(DevGzbxDO devGzbxDO) {
|
||||
devGzbxDO.setDevStatus(1);
|
||||
devGzbxMapper.updateById(devGzbxDO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.lideeyunji.module.biz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.lideeyunji.module.biz.entity.DevArchivesEntity;
|
||||
import com.lideeyunji.module.biz.mapper.EquipmentArchivesMapper;
|
||||
import com.lideeyunji.module.biz.service.EquipmentArchivesService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Validated
|
||||
public class EquipmentArchivesServiceImpl implements EquipmentArchivesService {
|
||||
|
||||
@Resource
|
||||
private EquipmentArchivesMapper equipmentArchivesMapper;
|
||||
|
||||
@Override
|
||||
public List<DevArchivesEntity> selectByType(String devType) {
|
||||
LambdaQueryWrapper<DevArchivesEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(DevArchivesEntity::getDevType, devType).eq(DevArchivesEntity::getIsDeleted, 0);
|
||||
return equipmentArchivesMapper.selectList(queryWrapper);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.lideeyunji.module.biz.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DevArchivesVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String devCode;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String devName;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private String devType;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String devXh;
|
||||
|
||||
/**
|
||||
* 设备部门
|
||||
*/
|
||||
private String devDept;
|
||||
|
||||
/**
|
||||
* 设备所属单位
|
||||
*/
|
||||
private String devZzdw;
|
||||
|
||||
/**
|
||||
* 设备出厂日期
|
||||
*/
|
||||
private Date devCcrq;
|
||||
|
||||
/**
|
||||
* 设备启用日期
|
||||
*/
|
||||
private Date devQyrq;
|
||||
|
||||
/**
|
||||
* 设备功率/管理
|
||||
*/
|
||||
private String devGl;
|
||||
|
||||
/**
|
||||
* 设备安装位置
|
||||
*/
|
||||
private String devAzwz;
|
||||
|
||||
/**
|
||||
* 设备固定资产编码
|
||||
*/
|
||||
private String devGdzcbm;
|
||||
|
||||
/**
|
||||
* 设备图片
|
||||
*/
|
||||
private String devTp;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
private Long createDept;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long updateUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 逻辑删除标志(0-未删除,1-已删除)
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 291 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 243 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 271 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 298 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 327 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 348 KiB |
@@ -0,0 +1,31 @@
|
||||
package com.lideeyunji.tool.framework.yunji.enums;
|
||||
|
||||
|
||||
/**
|
||||
* 处理状态枚举
|
||||
*/
|
||||
public enum AcceptanceStatusEnum {
|
||||
|
||||
|
||||
UNTREATED(0, "未处理"),
|
||||
TREATED(1, "已处理"),
|
||||
PENDING(2, "待验收"),
|
||||
COMPLETED(3, "已完成"),
|
||||
;
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
AcceptanceStatusEnum(Integer type, String name) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lideeyunji.tool.framework.yunji.enums;
|
||||
|
||||
|
||||
/**
|
||||
* 验收状态枚举
|
||||
*/
|
||||
public enum ProcessingStatusEnum {
|
||||
UNACCEPTED(0, "未验收"),
|
||||
ACCEPTED(1, "已验收");
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
ProcessingStatusEnum(Integer type, String name) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||