Commit 9968a455 by 李小惠

Merge branch 'develop' of http://gitlab.sothing.top/843502640/jyzb_platformV2 into develop-lxh

# Conflicts:
#	app-log/error/log-error-2024-01-31.0.log
#	app-log/log_error.log
#	app-log/log_total.log
#	app-log/total/log-total-2024-01-31.0.log
parents 0ab25e79 853f7d82
......@@ -233,3 +233,7 @@ Thumbs.db
/jyzb-boot/src/main/resources/application-local.yml
/jyzb-boot/src/main/resources/application-local.yml
/jyzb-biz/jyzb-biz.iml
/app-log/error/log-error-2024-01-31.0.log.orig
/app-log/log_error.log.orig
/app-log/log_total.log.orig
/app-log/total/log-total-2024-01-31.0.log.orig
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.
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.junmp.jyzb.api.bean.dto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.SizeDto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.TypeDto;
import lombok.Data;
import java.util.List;
@Data
public class SizeAndTypeDto {
private List<SizeDto> sizeList;
private List<TypeDto> typeList;
private List<OrgDto> orgList;
}
......@@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
......@@ -19,13 +20,13 @@ public class ApplicationReq extends BaseRequest {
/**
* 应用id
*/
@NotBlank(message = "应用id不能为空",groups = {detail.class})
private String id;
/**
* 应用代码
*/
@TableField("app_code")
@NotBlank(message = "应用代码不能为空",groups = {detail.class})
private String appCode;
/**
......@@ -74,4 +75,7 @@ public class ApplicationReq extends BaseRequest {
* 更新人员
*/
private String updateUser;
//删除的id列表
private List<String> idsList;
}
......@@ -76,4 +76,8 @@ public class QueryOrderLogReq extends BaseRequest {
private Date startTime;
private Date endTime;
private Date createTime;
private String processType;
}
......@@ -38,6 +38,8 @@ public class CabinetPolicemanReq extends BaseRequest {
*/
private String finger;
private String password;
private List<Long> RolesList;
}
\ No newline at end of file
......@@ -19,6 +19,8 @@ public class PoliceListReq {
private String name;
private String finger;
private String password;
// /**
// * 角色id列表
// */
......
......@@ -15,7 +15,7 @@ public class UpdateBusFormReq extends BaseRequest {
/**
* id
*/
@NotBlank(message = "单据id不能为空",groups = {edit.class})
private String id;
// private String userId;
......@@ -32,7 +32,7 @@ public class UpdateBusFormReq extends BaseRequest {
/**
* 单据业务类型
*/
@NotBlank(message = "业务单据类型不能为空",groups = {add.class,edit.class})
private String bussinessType;
/**
......
......@@ -52,10 +52,16 @@ public class ApplicationController {
//新增或者修改应用信息
@PostMapping(path="/AddOrUpdateCfg",name="新增应用信息#logType=30")
@ApiOperation("新增应用信息")
@ApiOperation("新增或修改应用信息")
public ApiRes<String> AddOrUpdateCfg(@RequestBody @Validated(ValidationApi.add.class) ApplicationReq req){
return ApiRes.success(applicationService.AddOrUpdateCfg(req));
}
@PostMapping(path = "/delConfig",name = "删除应用信息#logType=30")
@ApiOperation("删除一个或者多个应用信息")
public ApiRes<Boolean> delConfig(@RequestBody ApplicationReq req){
return ApiRes.success(applicationService.delConfig(req));
}
}
......@@ -32,10 +32,10 @@ public class BussinessController {
public BusFormService busFormService;
//创建业务单
@PostMapping(path="/AddBussinessOrder",name="创建业务单#logType=30")
@ApiOperation("创建业务单")
public ApiRes<String> AddBussinessOrder(@RequestBody @Validated(ValidationApi.add.class) UpdateBusFormReq req){
//创建或者修改业务单
@PostMapping(path="/AddBussinessOrder",name="创建或者修改业务单#logType=30")
@ApiOperation("创建或者修改业务单")
public ApiRes<String> AddBussinessOrder(@RequestBody UpdateBusFormReq req){
return ApiRes.success(busFormService.AddBussinessOrder(req));
}
......
......@@ -92,12 +92,12 @@ public class EquipmentTypeController {
@PostMapping(path="/SetTypeParentIds",name="填充装备类型的parent_ids字段#logType=30")
@ApiOperation("填充装备类型的parent_ids字段")
public ResponseResult setTypeParentIds() {
ResponseResult returnMsg = equipmentTypeService.setTypeParentIds();
return returnMsg;
}
// @PostMapping(path="/SetTypeParentIds",name="填充装备类型的parent_ids字段#logType=30")
// @ApiOperation("填充装备类型的parent_ids字段")
// public ResponseResult setTypeParentIds() {
// ResponseResult returnMsg = equipmentTypeService.setTypeParentIds();
// return returnMsg;
// }
//返回整棵物资树
......
......@@ -110,5 +110,11 @@ public class PublicController {
return ApiRes.success(publicService.addDictType(req));
}
// @PostMapping("/aaa")
// public ApiRes<String> aaa(PolicemanReq req){
//
// return String;
// }
}
......@@ -64,12 +64,6 @@ public class TjController {
public ApiRes<List<TjOrgEqsDto>> TjOrgEqsDetail(@RequestBody TjOrgEqsReq req){
return ApiRes.success(tjService.GetTjDataDetail(req));
}
//装备统计报表(点击+后里面的数据)
@PostMapping("/TjOrgEqsDetailPage")
@ApiOperation("/查询组织机构下的装备统计明细分页")
public ApiRes<PageResult<InventorySumDto>> TjOrgEqsDetailPage(@RequestBody TjOrgEqsReq req){
return ApiRes.success(tjService.TjOrgEqsDetailPage(req));
}
@PostMapping("/TjOrgEqsDetailList")
@ApiOperation("/查询组织机构下的装备统计明细列表")
public ApiRes<List<InventorySumDto>> TjOrgEqsDetailList(@RequestBody TjOrgEqsReq req){
......@@ -101,23 +95,25 @@ public class TjController {
}
@PostMapping("/TjOrgPriceDetail")
@ApiOperation("/查询组织机构下的财务统计明细(改)")
@ApiOperation("/查询组织机构下的财务统计明细")
public ApiRes<List<TjOrgPriceDto>> TjOrgPriceDetail(@RequestBody TjOrgPriceReq req){
return ApiRes.success(tjService.TjOrgPriceDetail(req));
}
//财务统计报表(点击+后里面的数据)
@PostMapping("/TjOrgPriceDetailPage")
@ApiOperation("/查询组织机构下的财务统计明细")
public ApiRes<PageResult<TjOrgPriceDto>> TjOrgPriceDetailPage(@RequestBody TjOrgPriceReq req){
return ApiRes.success(tjService.TjOrgPriceDetailPage(req));
@PostMapping("/TjOrgPriceDetail1")
@ApiOperation("/查询组织机构下的财务统计明细二层结构(改)")
public ApiRes<List<TjOrgPriceDto>> TjOrgPriceDetail1(@RequestBody TjOrgPriceReq req){
return ApiRes.success(tjService.TjOrgPriceDetail1(req));
}
@PostMapping("/TjOrgPriceDetailList")
@ApiOperation("/查询组织机构下的财务统计明细")
@ApiOperation("/查询组织机构下的财务统计明细(改)")
public ApiRes<List<TjOrgPriceDto>> TjOrgPriceDetailList(@RequestBody TjOrgPriceReq req){
return ApiRes.success(tjService.TjOrgPriceDetailList(req));
}
@PostMapping(path="/TjOrgPriceExport",name="财务报表导出#logType=30")
@ApiOperation("财务报表导出")
public void TjOrgPriceExport(@RequestBody TjOrgPriceReq req){
......@@ -145,26 +141,19 @@ public class TjController {
public ApiRes<List<TjOrgCountDto>> TjOrgPriceDetail(@RequestBody TjOrgCountReq req){
return ApiRes.success(tjService.TjOrgCountDetail(req));
}
//财务统计报表(点击+后里面的数据)
@PostMapping("/TjOrgCountDetailPage")
@PostMapping("/TjOrgCountDetail1")
@ApiOperation("/查询组织机构下的使用统计明细")
public ApiRes<PageResult<TjOrgCountDto>> TjOrgPriceDetailPage(@RequestBody TjOrgCountReq req){
return ApiRes.success(tjService.TjOrgCountDetailPage(req));
public ApiRes<List<TjOrgCountDto>> TjOrgPriceDetail1(@RequestBody TjOrgCountReq req){
return ApiRes.success(tjService.TjOrgCountDetail1(req));
}
@PostMapping("/TjOrgCountDetailList")
@ApiOperation("/查询组织机构下的使用统计明细")
public ApiRes<List<TjOrgCountDto>> TjOrgCountDetailList(@RequestBody TjOrgCountReq req){
return ApiRes.success(tjService.TjOrgCountDetailList(req));
}
//更新使用次数统计报表
@PostMapping("updateTjOrgCount")
@ApiOperation("更新使用次数统计报表")
public ApiRes<Boolean> updateTjOrgCount(@RequestBody TjOrgCountReq req){
return ApiRes.success(tjService.updateTjOrgCount(req));
}
//首页使用柱状图
@PostMapping("/TjOrgCountByType")
@ApiOperation("九大类使用统计柱状图")
......@@ -199,12 +188,6 @@ public class TjController {
return ApiRes.success(tjService.TjOrgPoliceSum(req));
}
//人员统计报表(点击+后里面的数据)
// @PostMapping("/TjOrgPoliceDetailPage")
// @ApiOperation("/查询组织机构下的人员统计明细")
// public ApiRes<PageResult<TjOrgPoliceDto>> TjOrgPoliceDetailPage(@RequestBody TjOrgPoliceReq req){
// return ApiRes.success(tjService.TjOrgPoliceDetailPage(req));
// }
@PostMapping("/TjOrgPoliceDetailList")
@ApiOperation("/查询组织机构下的人员统计明细")
public ApiRes<List<TjOrgPoliceDto>> TjOrgPoliceDetailList(@RequestBody TjOrgPoliceReq req){
......
......@@ -183,7 +183,7 @@ public class BussinessInventory implements Serializable {
private List<BussinessDetail> detailList;
@TableField(value = "api", exist = false)
private String API;
private String api;
private static final long serialVersionUID = 1L;
......
......@@ -8,4 +8,5 @@ import java.util.List;
public class SizeAndType {
private List<EquipmentType> typeList;
private List<EquipmentSize> sizeList;
private List<PubOrg> orgList;
}
......@@ -185,7 +185,7 @@ import static com.junmp.junmpProcess.common.CommonConstants.*;
BussinessInventory BI = bussinessInventoryService.getOne(new LambdaQueryWrapper<BussinessInventory>()
.eq(BussinessInventory::getProcessId, processInstanceId));
BI.setExamineState("finished");
BI.setAPI("BussinessInventory");
BI.setApi("BussinessInventory");
bussinessInventoryService.updateById(BI);
MQ.SendMsg(exchangeName,BI.getOrgId().toString(),BI);
......
......@@ -17,7 +17,7 @@ import java.util.List;
*/
public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSummary> {
void addInfo(@Param("sql") String sql);
TjOrgCountDto TjOrgCount(@Param("orgId") String orgId,
@Param("typeIdsList") List<String> typeIdsList,
......@@ -25,12 +25,12 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
@Param("year")Integer year,
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList);
List<TjOrgCountDto> TjOrgCount1(@Param("orgId") String orgId,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("year")Integer year,
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList);
// List<TjOrgCountDto> TjOrgCount1(@Param("orgId") String orgId,
// @Param("typeIdsList") List<String> typeIdsList,
// @Param("sizeNameList") List<String> sizeNameList,
// @Param("year")Integer year,
// @Param("typeParentId")String typeParentId,
// @Param("monthList") List<Integer> monthList);
TjOrgCountDto TjOrgCountleve4(@Param("orgId") Long orgId,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
......@@ -53,26 +53,35 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList,
@Param("levelNum")Integer levelNum,
@Param("level")Integer level,@Param("column")String column,@Param("order")String order);
@Param("level")Integer level,
@Param("column")String column,
@Param("order")String order);
List<TjOrgCountDto> TjOrgCountTotalDetail(@Param("orgId") Long orgId,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("year") Integer year,
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList,
@Param("levelNum")Integer levelNum,
@Param("level")Integer level,
@Param("column")String column,
@Param("order")String order);
List<TjOrgCountDto> TjOrgCountDetail(@Param("orgId") Long orgId,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("year") Integer year,
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList,
@Param("levelNum")Integer levelNum,
@Param("level")Integer level,
@Param("column")String column,
@Param("order")String order);
FinalTjOrgCountDto TjOrgCountSum(@Param("orgId") Long orgId,
@Param("sizeNameList") List<String> sizeNameList,
@Param("typeIdsList") List<String> typeIdsList,
@Param("year")Integer year);
int TjOrgCountDetailSum(@Param("orgId")Long orgId,
@Param("year") Integer year,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList);
List<TjOrgCountDto> TjOrgCountDetail(@Param("orgId")Long orgId,
@Param("year") Integer year,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("pageNo")Long pageNo, @Param("pageSize") Long pageSize);
void deleteAll(@Param("orgId") Long orgId);
List<TjOrgCountDto> TjOrgCountByType(@Param("req") TjOrgCountReq req);
......
......@@ -18,7 +18,7 @@ public interface EquipmentTypeMapper extends BaseMapper<EquipmentType> {
void setTypeParentIds();
void setTypeParentIds(@Param("typeId")String typeId);
List<String> selectByItems(@Param("list1") List<String> list1,
@Param("list2") List<String> list2,
......
......@@ -70,12 +70,9 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
//获取合计
FinalTjOrgEqsDto getSumByViewOrgeqsSum();
int TjOrgEqsDetailSum(@Param("orgId") Long orgId,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList);
List<InventorySumDto> TjOrgEqsDetail(@Param("orgId") Long orgId, @Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("pageNo")Long pageNo, @Param("pageSize") Long pageSize);
@Param("column")String column, @Param("order") String order);
List<InventorySumDto> selectTotalNum(@Param("orgId") Long orgId,@Param("list") List<Object[]> searchCriteria );
......
......@@ -20,20 +20,14 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList")List<String> sizeNameList);
List<TjOrgPriceDto> TjOrgPriceDetail(@Param("orgId") Long orgId,
@Param("year") Integer year,
@Param("typeIdsList")List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("pageNo")Long pageNo, @Param("pageSize") Long pageSize);
int TjOrgPriceDetailSum(@Param("orgId") Long orgId,
@Param("year") Integer year,
@Param("typeIdsList")List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList);
// FinalTjOrgPriceDto TjOrgPriceSum(@Param("orgId") Long orgId,@Param("year") Integer year,
// @Param("typeIdsList") List<String> typeIdsList,
// @Param("sizeNameList") List<String> sizeNameList);
List<TjOrgPriceDto> TjOrgPriceDetail(@Param("orgId") Long orgId,
@Param("year") Integer year,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("column") String column,
@Param("order") String order);
void setSizeName(@Param("sizeId") String id, @Param("sizeName") String name);
......@@ -44,11 +38,7 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList")List<String> sizeNameList,
@Param("levelFlag")Integer levelFlag);
// TjOrgPriceDto TjOrgPriceLeve4(@Param("orgId") Long orgId,
// @Param("year") Integer year,
// @Param("typeIdsList") List<String> typeIdsList,
// @Param("sizeNameList")List<String> sizeNameList,
// @Param("levelFlag")Integer levelFlag);
TjOrgPriceDto TjOrgPriceBySelf(@Param("orgId") Long orgId,
......@@ -61,10 +51,14 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
@Param("sizeNameList")List<String> sizeNameList,
@Param("levelNum")Integer levelNum,
@Param("level")Integer level);
// List<TjOrgPriceDto> TjOrgPriceTotalNum(@Param("orgId") Long orgId,
// @Param("year") Integer year,
// @Param("typeIdsList") List<String> typeIdsList,
// @Param("sizeNameList")List<String> sizeNameList,
// @Param("levelNum")Integer levelNum);
List<TjOrgPriceDto> getTotalPriceDetail(@Param("orgId") Long orgId,
@Param("year") Integer year,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("levelNum") Integer levelNum,
@Param("level") Integer level,
@Param("column") String column,
@Param("order") String order);
}
......@@ -16,11 +16,15 @@ public interface ApplicationService extends IService<Application> {
//获取分页应用信息
PageResult<Application> GetAllUpdateCfg(ApplicationReq req);
//获取应用信息的列表
List<Application> GetAllUpdateCfgList(ApplicationReq req);
//获取应用信息一个
Application GetOne(ApplicationReq req);
//新增应用信息
////新增或者修改应用信息
String AddOrUpdateCfg(ApplicationReq req);
//删除一个或者多个应用信息
Boolean delConfig(ApplicationReq req);
}
......@@ -25,7 +25,7 @@ public interface EquipmentTypeService extends IService<EquipmentType> {
List<EquipmentTypeDto> getEquipmentList(QueryEquipmentTypeReq req);
EquipmentTypeDto getEquipment(QueryEquipmentTypeReq req );
List<EquipmentTypeDto> getLowType(QueryEquipmentTypeReq orgId);
ResponseResult setTypeParentIds();
// ResponseResult setTypeParentIds();
ESTypeDto getTypeTreeByEs(QueryEquipmentTypeReq req) throws IOException;
......
......@@ -20,16 +20,17 @@ public interface TjService {
//装备统计报表
PageResult<TjOrgEqsDto> GetTjData(TjOrgEqsReq req);
PageResult<InventorySumDto> TjOrgEqsDetailPage(TjOrgEqsReq req);
List<InventorySumDto> TjOrgEqsDetailList(TjOrgEqsReq req);
//财务统计报表
PageResult<TjOrgPriceDto> TjOrgPrice(TjOrgPriceReq req);
PageResult<TjOrgPriceDto> TjOrgPriceDetailPage(TjOrgPriceReq req);
List<TjOrgPriceDto> TjOrgPriceDetailList(TjOrgPriceReq req);
FinalTjOrgPriceDto TjOrgPriceSum(TjOrgPriceReq req);
List<TjOrgPriceDto> TjOrgPriceDetail(TjOrgPriceReq req);
List<TjOrgPriceDto> TjOrgPriceDetail1(TjOrgPriceReq req);
PageResult<TjOrgCountDto> TjOrgCount(TjOrgCountReq req);
......@@ -37,11 +38,9 @@ public interface TjService {
List<TjOrgCountDto> TjOrgCountDetail(TjOrgCountReq req);
PageResult<TjOrgCountDto> TjOrgCountDetailPage(TjOrgCountReq req);
List<TjOrgCountDto> TjOrgCountDetail1(TjOrgCountReq req);
List<TjOrgCountDto> TjOrgCountDetailList(TjOrgCountReq req);
boolean updateTjOrgCount(TjOrgCountReq req);
List<TjOrgCountDto> TjOrgCountByType(TjOrgCountReq req);
......@@ -71,4 +70,5 @@ public interface TjService {
void TjOrgPoliceExport(TjOrgPoliceReq req);
}
......@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.query.ApplicationReq;
import com.junmp.jyzb.api.exception.JYZBAppException;
import com.junmp.jyzb.api.exception.enums.CabinetExceptionEnum;
import com.junmp.jyzb.api.exception.enums.EquipmentExceptionEnum;
import com.junmp.jyzb.api.exception.enums.PublicExceptionEnum;
import com.junmp.jyzb.entity.Application;
import com.junmp.jyzb.service.ApplicationService;
......@@ -18,7 +20,9 @@ import com.junmp.v2.db.api.factory.PageFactory;
import com.junmp.v2.db.api.factory.PageResultFactory;
import com.junmp.v2.db.api.page.PageResult;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -38,18 +42,21 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
return PageResultFactory.createPageResult(page);
}
//获取应用信息的列表
public List<Application> GetAllUpdateCfgList(ApplicationReq req) {
LambdaQueryWrapper<Application> wrapper = createWrapper(req);
list(wrapper);
return list(wrapper);
}
//获取应用信息一个
public Application GetOne(ApplicationReq req) {
LambdaQueryWrapper<Application> wrapper = createWrapper(req);
Application one = getOne(wrapper);
return ObjectUtil.isNull(one)?new Application():one;
}
//新增应用信息
//新增或者修改应用信息
@Override
public String AddOrUpdateCfg(ApplicationReq req) {
Application application = new Application();
......@@ -93,6 +100,38 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
}
//删除一个或者多个应用信息
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean delConfig(ApplicationReq req) {
if (CollectionUtil.isEmpty(req.getIdsList())){
throw new ServiceException(CabinetExceptionEnum.PARAMETER_ERROR);
}
List<Application> list = list(new LambdaQueryWrapper<Application>().eq(Application::getId, req.getIdsList()));
List<String> nonexistentApp = new ArrayList<>();
for (String appId:req.getIdsList()) {
boolean flag=false;
for (Application app:list) {
if (appId.equals(app.getId())){
flag=true;
break;
}
}
if (!flag){
nonexistentApp.add(appId);
}
}
if (CollectionUtil.isNotEmpty(nonexistentApp)){
String msg="以下应用不存在:" +String.join(",", nonexistentApp);
throw new JYZBAppException(PublicExceptionEnum.APP_IS_NOT_EXIST, msg);
}else {
return removeBatchByIds(req.getIdsList());
}
}
private LambdaQueryWrapper<Application> createWrapper(ApplicationReq req) {
LambdaQueryWrapper<Application> wrapper = new LambdaQueryWrapper<>();
if (ObjectUtil.isEmpty(req)) {
......@@ -100,6 +139,7 @@ public class ApplicationServiceImpl extends ServiceImpl<ApplicationMapper, Appli
}
wrapper.like(ObjectUtil.isNotEmpty(req.getName()),Application::getName,req.getName());
wrapper.eq(ObjectUtil.isNotEmpty(req.getType()),Application::getType,req.getType());
wrapper.eq(ObjectUtil.isNotEmpty(req.getId()),Application::getId,req.getId());
wrapper.eq(ObjectUtil.isNotEmpty(req.getAppCode()),Application::getAppCode,req.getAppCode());
wrapper.orderByDesc(Application::getCreateTime);
return wrapper;
......
......@@ -142,7 +142,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
type.setUpdateTime(DateTimeUtil.getCurrentDateTime());
this.save(type);
//更新parent_ids字段
equipmentTypeMapper.setTypeParentIds();
equipmentTypeMapper.setTypeParentIds(type.getId());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
......@@ -335,12 +335,12 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
return count > 0;
}
@Override
public ResponseResult setTypeParentIds() {
//更新parent_ids字段
equipmentTypeMapper.setTypeParentIds();
return new ResponseResult(HttpStatus.SUCCESS, ReturnMsg.PASS);
}
// @Override
// public ResponseResult setTypeParentIds() {
// //更新parent_ids字段
// equipmentTypeMapper.setTypeParentIds();
// return new ResponseResult(HttpStatus.SUCCESS, ReturnMsg.PASS);
// }
public ESTypeDto getTypeTreeByEs(QueryEquipmentTypeReq req) throws IOException {
......@@ -529,31 +529,15 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
@Override
public String exportSizeAndType(QueryEquipmentTypeReq req) {
List<EquipmentType> typeList = list(new LambdaQueryWrapper<EquipmentType>().ge(EquipmentType::getUpdateTime, req.getUpdateTime()));
SizeAndTypeDto sizeAndType = new SizeAndTypeDto();
List<TypeDto> collect = typeList.stream().map(type -> {
TypeDto typeDto = new TypeDto();
BeanPlusUtil.copyProperties(type, typeDto);
return typeDto;
}).collect(Collectors.toList());
sizeAndType.setTypeList(CollectionUtil.isNotEmpty(collect)?collect:new ArrayList<>());
SizeAndType sizeAndType = new SizeAndType();
sizeAndType.setTypeList(CollectionUtil.isNotEmpty(typeList)?typeList:new ArrayList<>());
List<EquipmentSize> sizeList = equipmentSizeService.list(new LambdaQueryWrapper<EquipmentSize>().ge(EquipmentSize::getUpdateTime, req.getUpdateTime()));
List<SizeDto> collect1 = sizeList.stream().map(size -> {
SizeDto sizeDto = new SizeDto();
BeanPlusUtil.copyProperties(size, sizeDto);
return sizeDto;
}).collect(Collectors.toList());
sizeAndType.setSizeList(CollectionUtil.isNotEmpty(collect1)?collect1:new ArrayList<>());
sizeAndType.setSizeList(CollectionUtil.isNotEmpty(sizeList)?sizeList:new ArrayList<>());
if (req.getFlag()){
List<PubOrg> pubList = pubOrgService.list(new LambdaQueryWrapper<PubOrg>().ge(PubOrg::getUpdateTime, req.getUpdateTime())
.eq(PubOrg::getDelFlag,1));
List<OrgDto> collect2 = pubList.stream().map(pubOrg -> {
OrgDto orgDto = new OrgDto();
BeanPlusUtil.copyProperties(pubOrg, orgDto);
return orgDto;
}).collect(Collectors.toList());
sizeAndType.setOrgList(CollectionUtil.isNotEmpty(collect2)?collect2:new ArrayList<>());
sizeAndType.setOrgList(CollectionUtil.isNotEmpty(pubList)?pubList:new ArrayList<>());
}
String jsonString = JSONObject.toJSONString(sizeAndType);
......@@ -616,6 +600,8 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
}
}
......@@ -346,6 +346,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
return list;
}
//销毁装备申请之后将库存信息删除
public boolean addOrRevokeAgentDestructionNum(UpdateOrderReq req){
List<UpdateOrderDetailReq> list = req.getDetailList();
List<Object[]> searchItem=new ArrayList<>();
......@@ -450,45 +451,31 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
//纪录日志
private boolean addOrderLog(UpdateOrderReq req,String orderId,String orderCode,String s){
// LoginUser StartUser= LoginContext.getContext().getLoginUser();
// StartUser.
//判断日志中是否存在,如果存在直接替换
OrderLog createOrder = orderLogService.getOne(new LambdaQueryWrapper<OrderLog>()
.eq(OrderLog::getOrderId, req.getId())
.eq(OrderLog::getProcessType, "createOrder"));
//我要的是detail的明细存入到history—msg中
boolean a=true;
s=s.substring(0,s.length()-1);
if (createOrder==null){
OrderLog orderLog = new OrderLog();
orderLog.setId(UUID.randomUUID().toString());
orderLog.setHistoryMsg(s);
orderLog.setOrderCode(orderCode);
orderLog.setBussinessType(req.getBussinessType());
orderLog.setOrderType(req.getOrderType());
if (ObjectUtil.isNotNull(req.getStartOrgUserName())){
orderLog.setCreateUser(req.getStartOrgUserName());
}else {
orderLog.setCreateUser(req.getEndOrgUserName());
}
orderLog.setProcessType("careteOrder");
if (req.getOrderType().equals("in")){
orderLog.setOrgId(req.getEndOrgId());
orderLog.setOrgName(req.getEndOrgName());
}else {
orderLog.setOrgId(Long.parseLong(req.getStartOrgId()));
orderLog.setOrgName(req.getStartOrgName());
}
orderLog.setOrderId(orderId);
orderLog.setCreateTime(DateTimeUtil.getCurrentDateTime());
a=orderLogService.save(orderLog);
}else{//直接替换
createOrder.setHistoryMsg(s);
createOrder.setUpdateTime(DateTimeUtil.getCurrentDateTime());
a=orderLogService.updateById(createOrder);
OrderLog orderLog = new OrderLog();
orderLog.setId(UUID.randomUUID().toString());
orderLog.setHistoryMsg(s);
orderLog.setOrderCode(orderCode);
orderLog.setBussinessType(req.getBussinessType());
orderLog.setOrderType(req.getOrderType());
if (ObjectUtil.isNotNull(req.getStartOrgUserName())){
orderLog.setCreateUser(req.getStartOrgUserName());
}else {
orderLog.setCreateUser(req.getEndOrgUserName());
}
return a;
orderLog.setProcessType("createOrder");
if (req.getOrderType().equals("in")){
orderLog.setOrgId(req.getEndOrgId());
orderLog.setOrgName(req.getEndOrgName());
}else {
orderLog.setOrgId(Long.parseLong(req.getStartOrgId()));
orderLog.setOrgName(req.getStartOrgName());
}
orderLog.setOrderId(orderId);
orderLog.setCreateTime(DateTimeUtil.getCurrentDateTime());
return orderLogService.save(orderLog);
}
//修改业务单据可用次数
private OrderMain setBusFormState(UpdateOrderReq req,OrderMain one,Long orgId){
......
......@@ -330,6 +330,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
sysUser.setAccount(accountSet);
sysUser.setNickName(req.getName());
sysUser.setRealName(req.getName());
sysUser.setPassword(req.getPassword());
SysUserCreateFactory.fillAddSysUser(sysUser);
sysUser.setAvatar(FileConstant.DEFAULT_AVATAR_FILE_ID);
sysUser.setDelFlag(LogicDelEnum.N.getCode());
......@@ -355,6 +356,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
BeanPlusUtil.copyProperties(req,sysUser);
sysUser.setAccount(accountSet);
sysUser.setNickName(req.getName());
sysUser.setPassword(req.getPassword());
sysUser.setRealName(req.getName());
SysUserCreateFactory.fillAddSysUser(sysUser);
sysUser.setAvatar(FileConstant.DEFAULT_AVATAR_FILE_ID);
......@@ -584,6 +586,9 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
}
one.setPhoto(req.getFaceInfo());
one.setUpdateTime(DateTimeUtil.getCurrentDateTime());
SysUser user= sysUserService.getById(req.getUserId());
user.setPassword(req.getPassword());
sysUserService.updateById(user);
//修改角色
if (req.getRolesList().size()>0){
// sysUserRoleService.removeBatchByIds(req.getRolesList());
......@@ -702,14 +707,14 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
// 处理新增和修改
for (PoliceListReq reqPolice : policeReqList) {
Policeman dbPolice = findPoliceById(policeList, reqPolice.getPoliceID());
SysUser user= sysUserService.getById(dbPolice.getUserId());
if (dbPolice == null) {
// 新增数据
Policeman newPolice = convertToPoliceman(reqPolice, orgList.getOrgId());
toAdd.add(newPolice);
} else {
// 修改数据
Policeman updatedPolice = updatePoliceman(dbPolice, reqPolice, orgInfo, cabinetOrg);
Policeman updatedPolice = updatePoliceman(user,dbPolice, reqPolice, orgInfo, cabinetOrg);
toUpdate.add(updatedPolice);
}
}
......@@ -801,14 +806,14 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
}
// 辅助方法:更新 Policeman 对象的属性
private Policeman updatePoliceman(Policeman dbPolice, PoliceListReq reqPolice, PubOrg org, Cabinet cabinet) {
private Policeman updatePoliceman(SysUser user, Policeman dbPolice, PoliceListReq reqPolice, PubOrg org, Cabinet cabinet) {
CabinetBox cb = cabinetBoxService.getById(reqPolice.getCabinetBoxId());
if (cb.getBoxName() == null) {
cb.setBoxName("");
}
// 判断警员是否存在
// 判断传入的修改的警员编号与本身编号一致,如果一致则无所谓,如果不一致则需要判断修改的警员编号是否已经存在
user.setPassword(reqPolice.getPassword());
dbPolice.setUpdateTime(DateTimeUtil.getCurrentDateTime());
List<PoliceEquipment> policeEqsList = policeEquipmentService.list(new LambdaQueryWrapper<PoliceEquipment>()
.eq(PoliceEquipment::getPoliceId, dbPolice.getId()));
......@@ -957,6 +962,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
dbPolice.setOrgId(Long.valueOf(org.getOrgId()));
dbPolice.setState(1);
BeanPlusUtil.copyProperties(reqPolice, dbPolice);
sysUserService.updateById(user);
return dbPolice;
}
......
......@@ -21,24 +21,27 @@
<update id="setTypeParentIds" parameterType="java.util.Map">
UPDATE base_equipment_type t1
SET t1.parent_ids = (
WITH RECURSIVE ParentHierarchy AS (
SELECT id, parent_id
FROM base_equipment_type
WHERE id = t1.id
UNION
WITH RECURSIVE ParentHierarchy AS (
SELECT id, parent_id
FROM base_equipment_type
WHERE id = #{typeId}
SELECT t2.id, t2.parent_id
FROM ParentHierarchy ph
JOIN base_equipment_type t2 ON ph.parent_id = t2.id
)
SELECT IFNULL(GROUP_CONCAT(
CASE WHEN parent_id != '00000000-0000-0000-0000-000000000000' THEN parent_id END
ORDER BY parent_id SEPARATOR ','), '')
FROM ParentHierarchy
UNION
SELECT t.id, t.parent_id
FROM ParentHierarchy ph
JOIN base_equipment_type t ON ph.parent_id = t.id
)
UPDATE base_equipment_type t1
JOIN (
SELECT id, IFNULL(GROUP_CONCAT(
CASE WHEN parent_id != '00000000-0000-0000-0000-000000000000' THEN parent_id END
ORDER BY parent_id SEPARATOR ','), '') AS parent_ids
FROM ParentHierarchy
GROUP BY id
) t2 ON t1.id = t2.id
SET t1.parent_ids = t2.parent_ids
WHERE t1.parent_id IS NOT NULL;
</update>
<select id="selectByItems" resultType="java.lang.String">
......
......@@ -583,10 +583,13 @@
type_name,
size_name,
size_id
ORDER BY type_id
<if test="pageNo != null and pageNo != '' and pageSize != null and pageSize != '' ">
limit #{pageNo},#{pageSize}
<if test="column != null and column != '' and order != null and order != '' ">
order by ${column} ${order}
</if>
<if test="column == null and order == null">
ORDER BY type_id
</if>
</select>
<select id="selectTotalNum" resultType="com.junmp.jyzb.api.bean.dto.InventorySumDto">
......@@ -598,45 +601,7 @@
WHERE org_id_int = #{orgId} and (type_id = ${item[0]} AND size_id = '${item[1]}')
</foreach>
</select>
<select id="TjOrgEqsDetailSum" resultType="java.lang.Integer">
select count(*) from (
SELECT
type_name,
size_name,
type_id,
(
sum( CASE WHEN `base_inventory_summary`.`location_type` = 0 THEN `base_inventory_summary`.`stock_number` ELSE 0 END ) +
sum( CASE WHEN `base_inventory_summary`.`location_type` = 0 THEN `base_inventory_summary`.`outbound_number` ELSE 0 END ) +
sum( CASE WHEN `base_inventory_summary`.`location_type` = 0 THEN `base_inventory_summary`.`destruction_number` ELSE 0 END )
) AS total_number,
sum( CASE WHEN ( `base_inventory_summary`.`location_type` = 0 ) THEN `base_inventory_summary`.`stock_number` ELSE 0 END ) AS `ck_stock_number`,
sum( CASE WHEN ( `base_inventory_summary`.`location_type` = 0 ) THEN `base_inventory_summary`.`outbound_number` ELSE 0 END ) AS `ck_outbound_number`,
sum( CASE WHEN ( `base_inventory_summary`.`location_type` = 0 ) THEN `base_inventory_summary`.`destruction_number` ELSE 0 END ) AS `destruction_number`,
sum( CASE WHEN ( `base_inventory_summary`.`location_type` = 1 ) THEN `base_inventory_summary`.`stock_number` ELSE 0 END ) AS `djg_stock_number`,
sum( CASE WHEN ( `base_inventory_summary`.`location_type` = 1 ) THEN `base_inventory_summary`.`outbound_number` ELSE 0 END ) AS `djg_outbound_number`
FROM
base_inventory_summary
WHERE
org_id_int = #{orgId}
<if test="typeIdsList!=null and typeIdsList.size() > 0">
AND type_id IN
<foreach collection="typeIdsList " item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="sizeNameList!=null and sizeNameList.size() > 0">
AND
<foreach collection="sizeNameList " item="item" open="(" separator="or" close=")">
size_name like CONCAT('%', #{item}, '%')
</foreach>
</if>
GROUP BY
type_id,
type_name,
size_name
ORDER BY type_id
) as t
</select>
<select id="GetEquipmentSummarySum" resultType="java.lang.Integer"
parameterType="com.junmp.jyzb.api.bean.query.InventorySumReq">
select count(*) from (
......
......@@ -36,9 +36,9 @@ knife4j:
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
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
url: jdbc:mysql://192.168.1.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: root
password: junmp123
password: 123456
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.121:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
url: jdbc:mysql://192.168.1.128:3306/db_jyzb?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true
username: root
password: junmp123
password: 123456
redis:
#host: 192.168.3.188
......
......@@ -2,6 +2,7 @@ package com.junmp.junmpProcess.mapper;
import com.junmp.junmpProcess.entity.QuickSuggestions;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.junmp.jyzb.api.bean.query.QueryOrderLogReq;
import com.junmp.jyzb.api.bean.req.InventorySummaryReq;
import com.junmp.jyzb.api.bean.req.UpdateBusFormReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq;
......@@ -32,6 +33,8 @@ public interface QuickSuggestionsMapper extends BaseMapper<QuickSuggestions> {
List<UpdateOrderDetailReq> getOrderMainDetail(@Param("processId")String processInstanceId);
boolean updateDesNum(@Param("list") List<InventorySummaryReq> inventorySummaryList);
Boolean addOrderLog(@Param("req") QueryOrderLogReq orderLog);
}
......
......@@ -30,10 +30,12 @@ import com.junmp.junmpProcess.service.IFlowInstanceService;
import com.junmp.junmpProcess.service.IFlowTaskService;
import com.junmp.junmpProcess.service.Repository.ProcessTemplateService;
import com.junmp.junmpProcess.utils.CreateNullData;
import com.junmp.junmpProcess.utils.DateTimeUtil;
import com.junmp.junmpProcess.vo.*;
import com.junmp.jyzb.api.bean.dto.BusFormDto;
import com.junmp.jyzb.api.bean.dto.PolicemanDto;
import com.junmp.jyzb.api.bean.query.BussinessOrderDetialReq;
import com.junmp.jyzb.api.bean.query.QueryOrderLogReq;
import com.junmp.jyzb.api.bean.req.InventorySummaryReq;
import com.junmp.jyzb.api.bean.req.UpdateBusFormReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderDetailReq;
......@@ -302,7 +304,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
sendReq.setMsgTitle("您的审批被驳回");
sendReq.setBizType("refuse/"+Types);
sendReq.setBizId(Long.valueOf(task.getProcessInstanceId()));
sendReq.setMsgContent("您提交的审批【"+mainProcess.getName()+"】被驳回");
sendReq.setMsgContent("您提交的审批【"+mainProcess.getName()+"】被驳回,原因:"+handleDataDTO.getComments());
sendReq.setPriority("0");
sendReq.setSendTime(DateTime.now());
messageApi.sendMessage(sendReq);
......@@ -365,6 +367,9 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
break;
}
//将拒绝的单子创建日志
addOrderLog(StartUser,comments);
}else {
runtimeService.deleteProcessInstance(taskId, "拒绝");
}
......@@ -373,6 +378,16 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
return new ResponseResult(HttpStatus.SUCCESS, ReturnMsg.PASS,ReturnMsg.PASS);
}
private Boolean addOrderLog(SysUser sysUser,String comments){
QueryOrderLogReq orderLog = new QueryOrderLogReq();
orderLog.setId(UUID.randomUUID().toString());
orderLog.setHistoryMsg(StringUtils.isNotBlank(comments)?comments:"拒绝");
orderLog.setCreateUser(sysUser.getAccount());
orderLog.setProcessType("refuseOrder");
orderLog.setCreateTime(DateTimeUtil.getCurrentDateTime());
return quickSuggestionsMapper.addOrderLog(orderLog);
}
@Override
public ResponseResult revoke(HandleDataDTO handleDataDTO) {
SysUser StartUser=new SysUser();
......
......@@ -16,6 +16,10 @@
id,user_id,text,
create_time,update_time
</sql>
<insert id="addOrderLog">
insert into bussiness_order_log(id,history_msg,create_time,create_user,process_type)
values(#{req.id},#{req.historyMsg},#{req.createTime},#{req.createUser},#{req.processType})
</insert>
<update id="updateOrderMain" parameterType="java.lang.String">
update bussiness_order_main om
set om.examine_state ="refuse" where om.process_id =#{processId}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论