Commit 869950c5 by 李小惠

删除没用的定时任务,修改生成账号接口

parent 03383b2d
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -116,4 +116,10 @@ public class EquipmentTypeController {
return ApiRes.success(equipmentTypeService.exportSizeAndType(req));
}
@PostMapping(path = "/exportOrgInfo",name = "导出指定时间后的组织机构#enable")
@ApiOperation("导出指定时间后的组织机构")
public ApiRes<String> exportOrgInfo(@RequestBody QueryEquipmentTypeReq req){
return ApiRes.success(equipmentTypeService.exportOrgInfo(req));
}
}
......@@ -34,12 +34,6 @@ public class InventoryController {
public InventorySummaryService inventorySummaryService;
@Resource
public MQProductService mqProductService;
@GetMapping("/TestSum")
@ApiOperation("根据组织机构查询库存信息")
public ApiRes<Boolean> TestSum( ) {
inventorySummaryService.MonthStartSum();
return ApiRes.success();
}
@GetMapping("/testMQ")
@ApiOperation("根据组织机构查询库存信息")
......@@ -49,20 +43,6 @@ public class InventoryController {
}
//填充汇总信息(根据base_inventory表中数据汇总同步)--第一次进行数据同步,适用于3.0初始化inventory_summary表
//该方法只有插入语句,要注意inventory_summary表中没有数据,仅有结构,否则数据不准确
@PostMapping(path="/SetInventoryMsg",name="填充汇总表信息#logType=30")
@ApiOperation("填充汇总表信息")
public ApiRes<Boolean> setInventoryMsg(InventorySumReq req) {
boolean result = inventoryService.setInventoryMsg(req);
if (!result){
return ApiRes.failure("汇总失败");
}
return ApiRes.success(result);
}
//装备绑定箱门
@PostMapping(path="/EquipmentBind",name="装备绑定箱门#logType=30")
......
......@@ -313,9 +313,14 @@ public class PoliceController {
return ApiRes.success(policemanService.alignUserInfo(req));
}
// @PostMapping(path = "/oneClickAccountCreation",name = "一键生成账号(运维,管理,审核)#logType=30")
// public ApiRes<Boolean> oneClickAccountCreation(@RequestBody PubOrg pubOrg) throws IOException {
// return ApiRes.success(policemanService.oneClickAccountCreation(pubOrg));
// }
@PostMapping(path = "/oneClickAccountCreation",name = "一键生成账号(运维,管理,审核)#logType=30")
public ApiRes<Boolean> oneClickAccountCreation(@RequestBody PubOrg pubOrg) throws IOException {
return ApiRes.success(policemanService.oneClickAccountCreation(pubOrg));
return ApiRes.success(policemanService.oneClickAccountCreation1(pubOrg));
}
}
......@@ -89,8 +89,5 @@ public interface InventoryMapper extends BaseMapper<Inventory> {
// IPage<InventoryDto> GetDetailByTerms(@Param("page") Page<Object> defaultPage, @Param("req") InventoryReq req);
void reSetInventory(@Param("summaryTableName") String baseInventorySummary,
@Param("sourceTableName") String baseInventory,
@Param("warrantyThreshold") Integer brokenNumberDays,
@Param("sql") String sql);
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ import com.junmp.jyzb.entity.InventorySummary;
import com.junmp.jyzb.entity.Policeman;
import com.junmp.v2.sys.api.bean.user.SysUserDto;
import com.junmp.v2.sys.api.bean.user.req.SysUserReq;
import com.junmp.v2.sys.user.entity.SysUser;
import liquibase.pro.packaged.S;
import org.apache.ibatis.annotations.Mapper;
......@@ -64,4 +65,7 @@ public interface PolicemanMapper extends BaseMapper<Policeman> {
List<UserDto> alignUserInfo(@Param("orgId") Long orgId, @Param("date")String date);
List<UserDto> oneClickAccountCreation(@Param("orgId") Long orgId,@Param("account")String account,@Param("roleId")Long roleId);
List<UserDto> oneClickAccountCreation1(@Param("orgId") Long orgId);
void insertSysUser(@Param("userList") List<SysUser> sysUserList);
}
\ No newline at end of file
......@@ -13,20 +13,7 @@ import java.util.List;
public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
/**
* 存储过程-月初金额数量统计
*/
void MonthStart ();
/**
* 存储过程-月末金额数量统计
*/
void MonthEnd ();
/**
* 存储过程-月末差值计算统计
*/
void MonthDifference ();
TjOrgPriceDto TjOrgPrice(@Param("orgId") String orgId,
@Param("year") Integer year,
......
......@@ -34,4 +34,6 @@ public interface EquipmentTypeService extends IService<EquipmentType> {
List<TypeDto> alignTypeInfo(UpdateEquipmentTypeReq req);
String exportSizeAndType(QueryEquipmentTypeReq req);
String exportOrgInfo(QueryEquipmentTypeReq req);
}
......@@ -21,8 +21,6 @@ public interface InventoryService extends IService<Inventory> {
InventoryDto getInventoryDetail(InventoryReq msg);
//计算更新库存汇总表信息
boolean setInventoryMsg(InventorySumReq req);
boolean UpdateWarehouseInsNum(WarehouseReq req);
......
......@@ -13,8 +13,6 @@ import java.util.List;
public interface InventorySummaryService extends IService<InventorySummary> {
void MonthStartSum();
void MonthEndSum();
//根据条件查询库存汇总信息
PageResult<InventorySummary> getEquipmentInfo(InventorySumReq req);
......@@ -44,10 +42,7 @@ public interface InventorySummaryService extends IService<InventorySummary> {
List<InventorySumDto> selectTotalNum(SelectTotalNumReq req);
/**
* 更新使用次数和维修次数
*/
void updateCount();
//根据条件查询库存汇总信息(仅类型)
PageResult<InventorySummary> GetEquipmentSummary(InventorySumReq req);
......
......@@ -124,5 +124,7 @@ public interface PolicemanService extends IService<Policeman> {
List<UserDto> alignUserInfo(PolicemanReq req);
boolean oneClickAccountCreation(PubOrg pubOrg) throws IOException;
// boolean oneClickAccountCreation(PubOrg pubOrg) throws IOException;
boolean oneClickAccountCreation1(PubOrg pubOrg) throws IOException;
}
......@@ -568,6 +568,11 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
}
}
@Override
public String exportOrgInfo(QueryEquipmentTypeReq req) {
return null;
}
}
......@@ -131,31 +131,6 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean setInventoryMsg(InventorySumReq req){
//查询字典表中的临近报废天数
SysDictItem sysDictItem = sysDictItemService.getOne(new LambdaQueryWrapper<SysDictItem>()
.eq(SysDictItem::getItemText, "brokenNumber"));
//如果配置找不到,那就默认设置为15天为临近报废(如果装备的质保期小于15天了,就是为临近报废)
Integer brokenNumberDays;
if (ObjectUtil.isNotNull(sysDictItem)){
brokenNumberDays=15;
}else {
brokenNumberDays=Integer.parseInt(sysDictItem.getItemValue());
}
boolean b = inventorySummaryService.remove(new LambdaQueryWrapper<InventorySummary>().eq(InventorySummary::getOrgId, req.getOrgId()));
// //放入仓库区域信息汇总
// boolean b1 = inventoryMapper.SetWarehouseInventory(brokenNumberDays);
// //放入单警柜信息汇总
// boolean b = inventoryMapper.SetCabinetInventory(brokenNumberDays);
String sql="and bi.org_id_int = "+req.getOrgId();
inventoryMapper.reSetInventory("base_inventory_summary","base_inventory",brokenNumberDays,sql);
return (b);
}
//设置仓库库存数量(总数,在库数,出库数,价格)
@Override
......
......@@ -75,16 +75,6 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
private EquipmentTypeService equipmentTypeService;
@Override
public void MonthStartSum() {
PriceSumSummaryMapper.MonthStart();
}
@Override
public void MonthEndSum() {
PriceSumSummaryMapper.MonthEnd();
PriceSumSummaryMapper.MonthDifference();
}
//根据条件查询库存汇总信息
@Override
public PageResult<InventorySummary> getEquipmentInfo(InventorySumReq req) {
......@@ -405,20 +395,6 @@ public class InventorySummaryServiceImpl extends ServiceImpl<InventorySummaryMa
return inventorySumDtoList;
}
/**
* 更新使用次数和维修次数
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void updateCount() {
//先统计上一个月的使用次数和维修次数,然后再进行置零,开始计算下一个月的数据
equipmentCountSummaryMapper.deleteAll(null);
equipmentCountSummaryMapper.addInfo(" 1=1");
LambdaUpdateWrapper<InventorySummary> eq = new LambdaUpdateWrapper<InventorySummary>()
.set(InventorySummary::getUseCount,0).set(InventorySummary::getFixCount,0);
update(eq);
}
private LambdaQueryWrapper<InventorySummary> createWrapper(InventorySumReq req) {
......
package com.junmp.jyzb.task;
import com.junmp.jyzb.mapper.EquipmentCountSummaryMapper;
import com.junmp.jyzb.service.InventorySummaryService;
import com.junmp.v2.job.api.JobAction;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Slf4j
@Component
public class EquipmentCountAction implements JobAction {
private InventorySummaryService inventorySummaryService;
@Override
public void action() {
inventorySummaryService.updateCount();
}
}
package com.junmp.jyzb.task;
import com.junmp.jyzb.service.InventorySummaryService;
import com.junmp.v2.job.api.JobAction;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Slf4j
@Component
public class MonthEnd implements JobAction{
@Resource
public InventorySummaryService inventorySummaryService;
//月末执行以计算金额
@Override
public void action() {
// inventorySummaryService.MonthEndSum();
}
}
package com.junmp.jyzb.task;
import com.junmp.jyzb.service.InventorySummaryService;
import com.junmp.v2.job.api.JobAction;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Slf4j
@Component
public class MonthStart implements JobAction{
@Resource
public InventorySummaryService inventorySummaryService;
//月初执行
@Override
public void action() {
// inventorySummaryService.MonthStartSum();
}
}
package com.junmp.jyzb.task;
import com.junmp.jyzb.service.InventoryService;
import com.junmp.v2.job.api.JobAction;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Component
public class UpdateSummaryAction implements JobAction {
@Resource
private InventoryService inventoryService;
public void action(){
// inventoryService.setInventoryMsg();
}
}
......@@ -215,9 +215,7 @@
GROUP BY type_id,size_id,bi.org_id_int,location_id,bi.price) as t
GROUP BY t.locationId,t.type_id,t.size_id,t.orgId,t.unitPrice
</insert>
<insert id="reSetInventory">
{CALL InsertInventorySummary(#{summaryTableName,mode=IN},#{sourceTableName,mode=IN},#{warrantyThreshold,mode=IN},#{sql,mode=IN})}
</insert>
<select id="getSumByShelf" resultType="com.junmp.jyzb.entity.InventorySummary"
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.junmp.jyzb.mapper.PolicemanMapper">
<insert id="insertSysUser" useGeneratedKeys="true" keyProperty="user_id" parameterType="java.util.List">
insert into sys_user(
nick_name,real_name,account,password,avatar,del_flag,creatie_time,update_time
)
<foreach collection="userList" item="item" separator=",">
(
#{item.nickName}, #{item.realName}, #{item.account}, #{item.password}, #{item.avatar},
#{item.delFlag}, #{item.createTime}, #{item.updateTime}
)
</foreach>
</insert>
<!--<resultMap id="PolicemanMap" type="Map">-->
......@@ -382,6 +393,19 @@ WHERE o.org_id IN
</if>
order by uo.org_id
</select>
<select id="oneClickAccountCreation1" resultType="com.junmp.jyzb.api.bean.dto.FetchingDataDto.UserDto">
select t.*,uo.org_id FROM (
SELECT u.* FROM `sys_user` u
where u.account like "gl33%" or u.account like "yw33%" or u.account like "sh33%"
) as t
join sys_user_org uo on t.user_id=uo.user_id
<if test="orgId != null and orgId != ''">
and uo.org_id=#{orgId}
</if>
join sys_user_role ur on t.user_id=ur.user_id
join sys_role r on ur.role_id=r.role_id and r.role_id in ("1528003832557232130","1663372320355389441","1663372027127402498")
order by uo.org_id
</select>
</mapper>
\ No newline at end of file
......@@ -27,17 +27,9 @@
<!-- WHERE add_price IS NULL OR add_num IS NULL;-->
<!-- </update>-->
<select id="MonthStart" statementType="CALLABLE" >
{call UpdateStartSummary()}
</select>
<select id="MonthEnd" statementType="CALLABLE" >
{call UpdateEndSummary()}
</select>
<select id="MonthDifference" statementType="CALLABLE" >
{call UpdatePriceSummary()}
</select>
<select id="TjOrgPrice" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgPriceDto">
<!-- select t1.org_id,t1.org_code,t1.org_name,t1.d_name,-->
<!-- t2.start_num,t2.start_price,t2.end_num,t2.end_price,t2.add_num,t2.add_price,t2.destory_num,t2.destory_price-->
......
......@@ -36,9 +36,9 @@ knife4j:
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: junmp
password: 123456
url: jdbc:mysql://192.168.3.121:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: root
password: junmp123
redis:
#host: 192.168.3.188
......
......@@ -32,9 +32,9 @@ knife4j:
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.3.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: junmp
password: 123456
url: jdbc:mysql://192.168.3.121:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: root
password: junmp123
redis:
#host: 192.168.3.188
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论