Commit c9b14410 by 赵剑炜

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

parents 180162c0 73f369aa
......@@ -13,6 +13,7 @@ public class EquipmentTypeDto {
private String id;
private String name;
//别名
private String nickName;
private String unit;
private String unitType;
......
......@@ -43,8 +43,13 @@ public class OrderDetailDto implements Serializable {
//记账数量
private Integer modifyQuantity;
private BigDecimal price;
private BigDecimal totalPrice;
private String price;
private BigDecimal planTotalPrice;
private BigDecimal actualTotalPrice;
private String detailJson;
/**
* 在库数
*/
......@@ -68,4 +73,7 @@ public class OrderDetailDto implements Serializable {
private String remark;
private List<DetailJsonReq> childJson;
//Epc类型(0固定资产1库存物资非固定资产)
private Integer property;
}
......@@ -2,12 +2,22 @@ package com.junmp.jyzb.api.bean.query.InAndOutRecordReq;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class DetailJsonReq {
private String locationId;
private Integer num;
private String locationName;
private String typeId;
private String typeName;
private String sizeId;
private String sizeName;
private Integer modifyQuantity;
private BigDecimal price;
//Epc类型(0固定资产1库存物资非固定资产)
private Integer property;
private List<DetailJsonReq> childDetailJson;
}
......@@ -18,5 +18,7 @@ public class DetailLogReq {
private Integer errorState;
private BigDecimal price;
private Integer equipmentType;
//Epc类型(0固定资产1库存物资非固定资产)
private Integer epcType;
}
......@@ -3,6 +3,7 @@ package com.junmp.jyzb.api.bean.query.InAndOutRecordReq;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
@Data
public class DetailOrderReq {
......@@ -10,4 +11,5 @@ public class DetailOrderReq {
private String orderType;
private BigDecimal price;
private Integer actualNum;
private List<DetailJsonReq> detailJson;
}
......@@ -22,5 +22,5 @@ public class OrderReq {
private String bussinessType;
private List<DetailOrderReq> orderDetail;
private List<PurchaseEqsReq> purchaseList;
private List<DetailJsonReq> detailJson;
}
......@@ -23,5 +23,6 @@ public class PurchaseEqsReq {
//装备类型0单件,1装备包
private Integer equipmentType;
private BigDecimal price;
private Integer epcType;
}
package com.junmp.jyzb.api.bean.query;
import com.baomidou.mybatisplus.annotation.TableField;
import com.junmp.v2.common.bean.request.BaseRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -36,8 +37,13 @@ public class OrderDetailReq extends BaseRequest {
private Integer actualNum;
private BigDecimal totalPrice;
private BigDecimal price;
private String price;
private BigDecimal planTotalPrice;
private BigDecimal actualTotalPrice;
private String detailJson;
private String orderType;
......@@ -73,4 +79,7 @@ public class OrderDetailReq extends BaseRequest {
*/
private Integer maintenancePeriod;
private String remark;
//Epc类型(0固定资产1库存物资非固定资产)
private Integer property;
}
package com.junmp.jyzb.api.bean.query;
import lombok.Data;
import java.util.List;
@Data
public class PoliceBindInvReq {
private Long orgId;
private String orgName;
private String policeId;
private String policeName;
private Integer totalNum;
private Integer inNum;
private Integer outNum;
private List<String> epcList;
// private List<>
}
......@@ -17,4 +17,8 @@ public class TjOrgCountReq extends BaseRequest {
@NotNull(message = "年份不能为空",groups = detail.class)
private Integer year;
private List<Integer> monthList;
private Boolean removeEmpty;
private String typeParentId;
private Integer levelNum;
}
\ No newline at end of file
package com.junmp.jyzb.api.bean.req;
import com.baomidou.mybatisplus.annotation.TableField;
import com.junmp.jyzb.api.bean.query.InAndOutRecordReq.DetailJsonReq;
import com.junmp.v2.common.bean.request.ValidationApi;
import lombok.Data;
......@@ -43,8 +44,12 @@ public class UpdateOrderDetailReq implements Serializable {
private String supplierName;
private Integer planNum;
private BigDecimal totalPrice;
private BigDecimal price;
private String price;
private BigDecimal planTotalPrice;
private BigDecimal actualTotalPrice;
private String detailJson;
private String warehouseId;
......@@ -86,4 +91,7 @@ public class UpdateOrderDetailReq implements Serializable {
private String remark;
private Long orgId;
private List<DetailJsonReq> childJson;
//Epc类型(0固定资产1库存物资非固定资产)
private Integer property;
}
......@@ -14,6 +14,7 @@ public enum OrderExceptionEnum implements IExceptionEnum {
ORDERDETAIL_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"子单据不一致,操作失败"),
ROLE_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"审核组织机构用户配置异常!请检查日志"),
ORDER_CREATE_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE,"单子创建失败"),
ORDER_NUM_IS_NULL(CommonConstant.DEFAULT_USER_ERROR_CODE,"记账数量为空或0,请确认记账数量"),
;
/**
......
......@@ -72,9 +72,9 @@ public class BussinessInventoryController {
return ApiRes.success(BussinessInventoryService.GetPage(req));
}
//盘库申请
@PostMapping(path="/GetById",name="查询详情#enable")
@PostMapping(path="/GetDetailById",name="查询详情#enable")
@ApiOperation("查询详情")
public ApiRes<BussinessInventoryDto> GetById (@RequestBody BussinessInventoryReq req){
public ApiRes<BussinessInventoryDto> GetDetailById (@RequestBody BussinessInventoryReq req){
//判断是否有工作流id,如果有则将状态进行修改
return ApiRes.success(BussinessInventoryService.GetDetailById(req));
}
......
......@@ -318,4 +318,5 @@ public class InventoryController {
return ApiRes.success(inventoryService.EqsImport(req));
}
}
......@@ -47,6 +47,9 @@ public class OutAndInboundController {
@Resource
private LogSummarySecondService logSummarySecondService;
@Resource
private InventoryService inventoryService;
@ApiOperation("/查看出入库详情")
@PostMapping(path="/GetDetailByLogSumId",name="查看出入库详情#enable")
public ApiRes<List<LogDetailDto>> GetDetailByLogSumId(@RequestBody @Validated(ValidationApi.detail.class) LogDetailReq req){
......@@ -101,5 +104,11 @@ public class OutAndInboundController {
return ApiRes.success(orderLogService.getSecondInfoByLogSumId(req));
}
// @PostMapping(path = "bind",name = "装备绑定或解绑#enable")
// @ApiOperation("装备绑定或者解绑")
// public ApiRes<Boolean> bind (){
// return ApiRes.success(inventoryService.bind());
// }
}
......@@ -119,7 +119,7 @@ public class TjController {
}
@PostMapping("/TjOrgPriceDetail")
@ApiOperation("/查询组织机构下的财务统计明细")
@ApiOperation("/查询组织机构下的财务统计明细(改)")
public ApiRes<List<TjOrgPriceDto>> TjOrgPriceDetail(@RequestBody TjOrgPriceReq req){
return ApiRes.success(tjService.TjOrgPriceDetail(req));
}
......@@ -151,6 +151,12 @@ public class TjController {
return ApiRes.success(tjService.TjOrgCountSum(req));
}
@PostMapping("/TjOrgCountDetail")
@ApiOperation("/查询组织机构下的使用统计明细")
public ApiRes<List<TjOrgCountDto>> TjOrgPriceDetail(@RequestBody TjOrgCountReq req){
return ApiRes.success(tjService.TjOrgCountDetail(req));
}
//财务统计报表(点击+后里面的数据)
@PostMapping("/TjOrgCountDetailPage")
@ApiOperation("/查询组织机构下的使用统计明细")
......
......@@ -207,4 +207,8 @@ public class Inventory implements Serializable {
@TableField(exist = false)
private String bussinessType;
//Epc类型(0固定资产1库存物资非固定资产)
@TableField(value = "property")
private Integer property;
}
\ No newline at end of file
......@@ -215,6 +215,10 @@ public class InventorySummary implements Serializable {
@TableField(value = "agent_broken_num")
private Integer agentBrokenNum;
//Epc类型(0固定资产1库存物资非固定资产)
@TableField(value = "property")
private Integer property;
private static final long serialVersionUID = 1L;
......
......@@ -2,6 +2,7 @@ package com.junmp.jyzb.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import liquibase.pro.packaged.S;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -58,15 +59,19 @@ import java.util.Date;
private Integer modifyQuantity;
@TableField("price")
private BigDecimal price;
private String price;
@TableField("total_price")
private BigDecimal totalPrice;
@TableField("plan_total_price")
private BigDecimal planTotalPrice;
@TableField("actual_total_price")
private BigDecimal actualTotalPrice;
@TableField("detailJson")
private String detailJson;
@TableField("order_type")
private String orderType;
/**
* 创建时间
*/
......@@ -106,4 +111,8 @@ import java.util.Date;
@TableField("remark")
private String remark;
//Epc类型(0固定资产1库存物资非固定资产)
@TableField(value = "property")
private Integer property;
}
......@@ -104,7 +104,7 @@ public class OrderLog implements Serializable {
private String updateUser;
/**
* 过程事件(创建单据createOrder,出入库OutAndIn,记账accounting
* 过程事件(创建单据createOrder,出入库OutAndIn,记账)
*/
@TableField(value = "process_type")
private String processType;
......
......@@ -137,7 +137,7 @@ public class OrderMain implements Serializable {
private Date returnDate;
/**
* 移仓库id
* 移仓库id
*/
@TableField("location_id")
private String locationId;
......@@ -148,12 +148,12 @@ public class OrderMain implements Serializable {
private String locationName;
/**
* 移仓库id
* 移仓库id
*/
@TableField("remove_location_id")
private String removeLocationId;
/**
* 移仓库名称
* 移仓库名称
*/
@TableField("remove_location_name")
private String removeLocationName;
......
......@@ -63,6 +63,11 @@ public class PoliceEquipment implements Serializable {
@TableField("num")
private Integer num;
@TableField(value = "in_num")
private Integer inNum;
@TableField(value = "out_num")
private Integer outNum;
/**
* 组织机构ID
*/
......@@ -97,6 +102,8 @@ public class PoliceEquipment implements Serializable {
@TableField("create_time")
private Date createTime;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -170,6 +170,7 @@ import static com.junmp.junmpProcess.common.CommonConstants.*;
UpdateReassignmentReq updateReassignmentReq = new UpdateReassignmentReq();
one.setExamineState("finished");
BeanPlusUtil.copyProperties(one,updateReassignmentReq);
//如果同意直接讲警员基础信息进行修改
policemanService.changePoliceOrg(updateReassignmentReq);
reassignmentService.updateById(one);
} else
......
......@@ -19,10 +19,29 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
void addInfo(@Param("sql") String sql);
List<TjOrgCountDto> TjOrgCount(@Param("orgId") Long orgId,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList") List<String> sizeNameList,
@Param("year")Integer year);
TjOrgCountDto TjOrgCount(@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,
@Param("year") Integer year,
@Param("typeParentId")String typeParentId,
@Param("monthList") List<Integer> monthList,
@Param("levelFlag")Integer levelFlag);
List<TjOrgCountDto> TjOrgCountTotalNum(@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);
FinalTjOrgCountDto TjOrgCountSum(@Param("orgId") Long orgId,
@Param("sizeNameList") List<String> sizeNameList,
......@@ -47,6 +66,8 @@ public interface EquipmentCountSummaryMapper extends BaseMapper<EquipmentCountSu
void setSizeName(@Param("sizeId") String id,@Param("sizeName") String name);
void setTypeName(@Param("typeId") String id,@Param("typeName") String name);
}
......
......@@ -39,6 +39,7 @@ public interface InventorySummaryMapper extends BaseMapper<InventorySummary> {
//根据组织机构,仓库,type,size,unitprice查询库存汇总信息
List<InventorySummary> selectSumByItems(@Param("list") List<Object[]> searchCriteria);
List<InventorySummary> selectSum(@Param("list") List<Object[]> searchCriteria);
//根据组织机构查询报表中的本级及下一级信息
List<TjOrgEqsDto> getByOrgId(@Param("orgId") Long orgId);
......
......@@ -44,9 +44,9 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
@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);
// FinalTjOrgPriceDto TjOrgPriceSum(@Param("orgId") Long orgId,@Param("year") Integer year,
// @Param("typeIdsList") List<String> typeIdsList,
// @Param("sizeNameList") List<String> sizeNameList);
void setSizeName(@Param("sizeId") String id, @Param("sizeName") String name);
......@@ -55,10 +55,12 @@ public interface PriceSumSummaryMapper extends BaseMapper<PriceSumSummary> {
TjOrgPriceDto TjOrgPriceLeve4(@Param("orgId") Long orgId,
@Param("year") Integer year,
@Param("typeIdsList") List<String> typeIdsList,
@Param("sizeNameList")List<String> sizeNameList,@Param("levelFlag")Integer levelFlag);
@Param("sizeNameList")List<String> sizeNameList,
@Param("levelFlag")Integer levelFlag);
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);
@Param("sizeNameList")List<String> sizeNameList,
@Param("levelNum")Integer levelNum);
}
......@@ -42,9 +42,9 @@ public class OutInLogsReceiver {
logRecordDTO.setLogContent("OrderResult");
logRecordDTO.setRequestParams(msg);
logRecordDTO.setLogType(30);
logRecordDTO.setRequestUrl("queues = \"11111\"");
logRecordDTO.setRequestUrl("queues = \"orderResult\"");
try {
// System.out.println("msg = " + msg);
System.out.println("msg = " + msg);
// 创建日志对象
// 手动确认消息
......
......@@ -37,6 +37,8 @@ public interface TjService {
FinalTjOrgCountDto TjOrgCountSum(TjOrgCountReq req);
List<TjOrgCountDto> TjOrgCountDetail(TjOrgCountReq req);
PageResult<TjOrgCountDto> TjOrgCountDetailPage(TjOrgCountReq req);
List<TjOrgCountDto> TjOrgCountDetailList(TjOrgCountReq req);
......@@ -64,4 +66,6 @@ public interface TjService {
void TjOrgEqsExport(TjOrgEqsReq req);
}
......@@ -83,7 +83,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
List<EquipmentSize> list = list(new LambdaQueryWrapper<EquipmentSize>()
.eq(EquipmentSize::getTypeId,req.getTypeId())
.orderByDesc(EquipmentSize::getCode));
String code="0";
String code="1";
if (list.size()>0){
int i = Integer.parseInt(list.get(0).getCode());
code=String.valueOf(i+1);
......@@ -103,7 +103,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
size.setUpdateTime(DateTimeUtil.getCurrentDateTime());
this.save(size);
sizeRepository.save(size);
return sizeID;
return sizeID+"||"+code;
}
@Override
......
package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
......@@ -106,7 +107,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
parentType.setCode(String.valueOf(newcode));
List<SupplierType> supplierType = new ArrayList<>();
//判断req.getSupplierList()是否为空,如果为空则不进行循环
if (req.getSupplierList().size()!=0){
if (CollectionUtil.isNotEmpty(req.getSupplierList())){
req.getSupplierList().forEach(supply -> {
SupplierType st = new SupplierType();
st.setId(String.valueOf(UUID.randomUUID()));
......
......@@ -866,8 +866,14 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
Integer inventoryQuantity=0;
Integer actualQuantity=0;
List<PoliceEquipment> reqEquipments = JSON.parseArray(req.getDetailList(), PoliceEquipment.class);
//查询出该警员的所有装备信息
LambdaQueryWrapper<PoliceEquipment> eq = new LambdaQueryWrapper<PoliceEquipment>()
.eq(PoliceEquipment::getPoliceId, policeman.getId());
//查询该警员是否存在装备信息,如果存在则进行删除
List<PoliceEquipment> list1 = policeEquipmentService.list(eq);
//判断是调入单还是调出单
//0是调入警员,1是调出警员
//assign是调入
if(req.getReassignmentType().equals(itemValue) && itemValue.equals("assign")){
//添加账号和组织机构的绑定关系
SysUserOrg sysUserOrg = new SysUserOrg();
......@@ -877,23 +883,33 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
sysUserOrgService.save(sysUserOrg);
//将警员中的组织机构id设置
policeman.setOrgId(req.getOrgId());
policeman.setState(1);
//如果调入的警员携带装备,那么我应该怎么处理呢
stringBuilder.append("警员:"+req.getPoliceName()+",警号为:"+req.getPoliceCode()+",因调岗携带以下装备:");
if(ObjectUtil.isNotNull(reqEquipments)){
if(CollectionUtil.isNotEmpty(reqEquipments)){
for (PoliceEquipment equipment:reqEquipments) {
stringBuilder.append(equipment.getTypeName()+"【"+equipment.getSizeName()+"】,数量为:"+equipment.getNum()+"\n");
inventoryQuantity+=equipment.getNum();
actualQuantity+=equipment.getNum();
}
}
if (CollectionUtil.isNotEmpty(list1)){
for (PoliceEquipment pe:list1) {
pe.setOrgId(req.getOrgId());
}
policeEquipmentService.updateBatchById(list1);
}
//(调岗调入时在配置箱门的时候进行添加装备信息)
}else if (req.getReassignmentType().equals(itemValue1) && itemValue1.equals("reassign")){
}
//assign是调出
else if (req.getReassignmentType().equals(itemValue1) && itemValue1.equals("reassign")){
//将其组织机构号设为空
policeman.setOrgId(null);
policeman.setState(2);
//将账号与组织机构关联表进行删除
sysUserOrgService.remove(new LambdaQueryWrapper<SysUserOrg>().eq(SysUserOrg::getUserId,policeman.getUserId()));
......@@ -901,20 +917,16 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
cabinetBoxPoliceService.remove(new LambdaQueryWrapper<CabinetBoxPolice>()
.eq(CabinetBoxPolice::getPoliceId,policeman.getId()));
//查询出该警员的所有装备信息
LambdaQueryWrapper<PoliceEquipment> eq = new LambdaQueryWrapper<PoliceEquipment>()
.eq(PoliceEquipment::getPoliceId, policeman.getId());
//查询该警员是否存在装备信息,如果存在则进行删除
List<PoliceEquipment> list1 = policeEquipmentService.list(eq);
//判断前端传递的装备列表字段是否为空,如果为空则表示该警员不拿走任何装备信息
//判断前端传递的装备列表字段是否为空,如果为空则表示该警员不拿走任何装备信息(不做任何操作)
if (ObjectUtil.isNull(req.getDetailList()) || req.getDetailList().trim().isEmpty()){
if (list1.size()>0){
// policeEquipmentService.remove(eq);
policeEquipmentService.removeBatchByIds(list1);
}
// if (list1.size()>0){
//// policeEquipmentService.remove(eq);
// policeEquipmentService.removeBatchByIds(list1);
// }
} else {//将该警员拿走的装备的组织机构设置为空,并且其他装备进行跟警员进行解绑删除
List<PoliceEquipment> removeList=new ArrayList<>();
//更新装备(将装备信息进行删除)
List<PoliceEquipment> updateList=new ArrayList<>();
List<Object[]> searchItem=new ArrayList<>();
......@@ -945,26 +957,26 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
policeEquipmentService.updateBatchById(updateList);
policeEquipmentService.removeBatchByIds(removeList);
if (searchItem.size()>0)
{
//修改库存数量
List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSumByItems(searchItem);
List<InventorySummary> updateSummaryList=new ArrayList<>();
for (InventorySummary is:inventorySummaryList) {
for ( Object[] one: searchItem) {
if (is.getLocationId().equals(one[1]) && is.getTypeId().equals(one[2])
&& is.getSizeId().equals(one[3]) && is.getUnitPrice().compareTo(new BigDecimal(one[4].toString()))==0){
is.setOutboundNumber(is.getOutboundNumber()-Integer.parseInt(one[5].toString()));
is.setNumber(is.getNumber()-Integer.parseInt(one[5].toString()));
updateSummaryList.add(is);
break;
}
}
}
if (updateSummaryList.size()>0){
inventorySummaryService.updateBatchById(updateSummaryList);
}
}
// if (searchItem.size()>0)
// {
// //修改库存数量
// List<InventorySummary> inventorySummaryList = inventorySummaryMapper.selectSumByItems(searchItem);
// List<InventorySummary> updateSummaryList=new ArrayList<>();
// for (InventorySummary is:inventorySummaryList) {
// for ( Object[] one: searchItem) {
// if (is.getLocationId().equals(one[1]) && is.getTypeId().equals(one[2])
// && is.getSizeId().equals(one[3]) && is.getUnitPrice().compareTo(new BigDecimal(one[4].toString()))==0){
// is.setOutboundNumber(is.getOutboundNumber()-Integer.parseInt(one[5].toString()));
// is.setNumber(is.getNumber()-Integer.parseInt(one[5].toString()));
// updateSummaryList.add(is);
// break;
// }
// }
// }
// if (updateSummaryList.size()>0){
// inventorySummaryService.updateBatchById(updateSummaryList);
// }
// }
}
//记录日志(如果警员携带装备,则进行记录 )
if (ObjectUtil.isNotNull(reqEquipments)){
......@@ -1104,6 +1116,8 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
return reassignment.getId();
}
reassignment.setCreateTime(DateTimeUtil.getCurrentDateTime());
reassignment.setUpdateTime(DateTimeUtil.getCurrentDateTime());
//如果id是空默认是新建单据,name生成新的单据编号
if (ObjectUtil.isNull(req.getId()) || req.getId().isEmpty()){
OrderNum orderNum = stocktakeService.setOrderCode(req.getBussinessType(), req.getOrgId());
String codeValue=String.format("%04d",orderNum.getNum());
......@@ -1112,7 +1126,7 @@ public class PolicemanServiceImpl extends ServiceImpl<PolicemanMapper, Policeman
String.format("%02d",LocalDateTime.now().getDayOfMonth())+codeValue);
reassignmentService.save(reassignment);
}
//执行工作流
//执行工作流(如果点击提交接入审核流)
if (req.getExamineState().equals("working"))
{
StartProcessInstanceDTO startProcessInstanceDTO = setParams(req,reassignment);
......
......@@ -435,20 +435,30 @@ public class TjServiceImpl implements TjService {
List<String> orgList= inventorySummaryMapper.getTotalData(String.valueOf(req.getOrgId()));
List<TjOrgPriceDto> tjOrgPriceDtoList=new ArrayList<>();
//根据条件查询财务汇总表
//循环遍历下一级以及它下面的汇总信息
for (String orgId:orgList) {
TjOrgPriceDto OrgData=priceSumSummaryMapper.TjOrgPrice(orgId, req.getYear(),req.getTypeIdsList(),req.getSizeNameList() );
OrgData.setAddNum(ObjectUtil.isNull(OrgData.getAddNum())?0:OrgData.getAddNum());
OrgData.setEndNum(ObjectUtil.isNull(OrgData.getEndNum())?0:OrgData.getEndNum());
OrgData.setStartNum(ObjectUtil.isNull(OrgData.getStartNum())?0:OrgData.getStartNum());
OrgData.setDestoryNum(ObjectUtil.isNull(OrgData.getDestoryNum())?0:OrgData.getDestoryNum());
OrgData.setStartPrice(ObjectUtil.isNull(OrgData.getStartPrice())?BigDecimal.ZERO:OrgData.getStartPrice());
OrgData.setEndPrice(ObjectUtil.isNull(OrgData.getEndPrice())?BigDecimal.ZERO:OrgData.getEndPrice());
OrgData.setAddPrice(ObjectUtil.isNull(OrgData.getAddPrice())?BigDecimal.ZERO:OrgData.getAddPrice());
OrgData.setDestoryPrice(ObjectUtil.isNull(OrgData.getDestoryPrice())?BigDecimal.ZERO:OrgData.getDestoryPrice());
tjOrgPriceDtoList.add(OrgData);
}
if (req.getOrgId()!=1369509498032808905L){
TjOrgPriceDto OrgData=priceSumSummaryMapper.TjOrgPriceLeve4(req.getOrgId(), req.getYear(),req.getTypeIdsList(),req.getSizeNameList(),pubOrg.getLevelFlag());
TjOrgPriceDto OrgData=priceSumSummaryMapper.TjOrgPriceLeve4(req.getOrgId(), req.getYear(),req.getTypeIdsList(),
req.getSizeNameList(),pubOrg.getLevelFlag());
tjOrgPriceDtoList.add(OrgData);//把本级数据加进去
}
//查询出来的组织机构进行判断,如果该组织机构下的装备装备总数为0,那么将该组织机构从list中移除
// if (req.getRemoveEmpty()){
// tjOrgPriceDtoList.removeIf(tjOrgEqsDto -> tjOrgEqsDto.getStartNum() == 0 && tjOrgEqsDto.getEndNum() == 0
// && tjOrgEqsDto.getDestoryNum()==0);
// }
if (req.getRemoveEmpty()){
tjOrgPriceDtoList.removeIf(tjOrgEqsDto -> tjOrgEqsDto.getStartNum() == 0 && tjOrgEqsDto.getEndNum() == 0
&& tjOrgEqsDto.getDestoryNum()==0);
}
//对组织机构进行排序
Comparator<TjOrgPriceDto> orgComparator = createOrgComparator();
......@@ -468,15 +478,6 @@ public class TjServiceImpl implements TjService {
}
@Override
public FinalTjOrgPriceDto TjOrgPriceSum(TjOrgPriceReq req) {
// FinalTjOrgPriceDto finalTjOrgPriceDto= priceSumSummaryMapper.TjOrgPriceSum(req.getOrgId(), req.getYear(),
// req.getTypeIdsList(),req.getSizeNameList());
// if (ObjectUtil.isNotNull(finalTjOrgPriceDto)) {
//
// return finalTjOrgPriceDto;
// }else {
// return new FinalTjOrgPriceDto();
// }
PubOrg pubOrg = pubOrgService.PubOrgExist(req.getOrgId());
FinalTjOrgPriceDto finalTjOrgPriceDto = new FinalTjOrgPriceDto();
finalTjOrgPriceDto.setAddNum(0);
......@@ -527,9 +528,6 @@ public class TjServiceImpl implements TjService {
tjOrgPriceDtoList.removeIf(tjOrgEqsDto -> tjOrgEqsDto.getStartNum() == 0 && tjOrgEqsDto.getEndNum() == 0
&& tjOrgEqsDto.getDestoryNum()==0);
}
//将组织机构进行排序后再进行返回
Comparator<TjOrgPriceDto> orgComparator = createOrgComparator();
Collections.sort(tjOrgPriceDtoList, orgComparator);
return tjOrgPriceDtoList;
}
......@@ -615,33 +613,87 @@ public class TjServiceImpl implements TjService {
@Override
public PageResult<TjOrgCountDto> TjOrgCount(TjOrgCountReq req) {
List<TjOrgCountDto> tjOrgCountDtoList =equipmentCountSummaryMapper.TjOrgCount(req.getOrgId(),
req.getTypeIdsList(),req.getSizeNameList(),req.getYear());
//先拿到符合条件的组织机构,再遍历组织机构组成数据
//(下一层数据组织机构数据)
PubOrg pubOrg = pubOrgService.PubOrgExist(req.getOrgId());
List<String> orgList= inventorySummaryMapper.getTotalData(String.valueOf(req.getOrgId()));
List<TjOrgCountDto> tjOrgCountList=new ArrayList<>();
for (String orgId:orgList) {
TjOrgCountDto orgData =equipmentCountSummaryMapper.TjOrgCount(orgId,
req.getTypeIdsList(),req.getSizeNameList(),req.getYear(),req.getTypeParentId(),req.getMonthList());
orgData.setNumber(ObjectUtil.isNull(orgData.getNumber())?0:orgData.getNumber());
orgData.setUseCount(ObjectUtil.isNull(orgData.getUseCount())?0:orgData.getUseCount());
orgData.setFixCount(ObjectUtil.isNull(orgData.getFixCount())?0:orgData.getFixCount());
tjOrgCountList.add(orgData);
}
if (req.getOrgId()!=1369509498032808905L){
TjOrgCountDto orgData =equipmentCountSummaryMapper.TjOrgCountleve4(req.getOrgId(),
req.getTypeIdsList(),req.getSizeNameList(),req.getYear(),req.getTypeParentId(),req.getMonthList(),pubOrg.getLevelFlag());
tjOrgCountList.add(orgData);
}
//查询出来的组织机构进行判断,如果该组织机构下的装备装备总数为0,那么将该组织机构从list中移除
if (req.getRemoveEmpty()){
tjOrgCountList.removeIf(TjOrgCountDto -> TjOrgCountDto.getNumber() == 0 );
}
//对组织机构进行排序
Comparator<TjOrgCountDto> orgComparator = createOrgComparator();
Collections.sort(tjOrgCountDtoList, orgComparator);
Collections.sort(tjOrgCountList, orgComparator);
Page<TjOrgCountDto> page = PageFactory.getDefaultPage(req.getPageNo(), req.getPageSize());
if (ObjectUtil.isNull(req.getPageNo()) && ObjectUtil.isNull(req.getPageSize())) {
req.setPageNo(1L);
req.setPageSize(10L);
}
long startIndex = (req.getPageNo() - 1) * req.getPageSize();
long endIndex = Math.min(startIndex + req.getPageSize(), tjOrgCountDtoList.size());
List<TjOrgCountDto> subList = tjOrgCountDtoList.subList((int) startIndex, (int)endIndex);
page.setTotal(tjOrgCountDtoList.size());
long endIndex = Math.min(startIndex + req.getPageSize(), tjOrgCountList.size());
List<TjOrgCountDto> subList = tjOrgCountList.subList((int) startIndex, (int)endIndex);
page.setTotal(tjOrgCountList.size());
page.setRecords(subList);
return PageResultFactory.createPageResult(page);
}
@Override
public FinalTjOrgCountDto TjOrgCountSum(TjOrgCountReq req) {
FinalTjOrgCountDto finalTjOrgCountDto =equipmentCountSummaryMapper.TjOrgCountSum(req.getOrgId(),req.getSizeNameList(),
req.getTypeIdsList(), req.getYear());
if (ObjectUtil.isNotNull(finalTjOrgCountDto)) {
return finalTjOrgCountDto;
}else {
return new FinalTjOrgCountDto();
FinalTjOrgCountDto finalTjOrgCountDto=new FinalTjOrgCountDto();
finalTjOrgCountDto.setFixCount(0);
finalTjOrgCountDto.setUseCount(0);
finalTjOrgCountDto.setNumber(0);
PubOrg pubOrg = pubOrgService.PubOrgExist(req.getOrgId());
List<String> orgList= inventorySummaryMapper.getTotalData(String.valueOf(req.getOrgId()));
List<TjOrgCountDto> tjOrgCountList=new ArrayList<>();
for (String orgId:orgList) {
TjOrgCountDto orgData =equipmentCountSummaryMapper.TjOrgCount(orgId,
req.getTypeIdsList(),req.getSizeNameList(),req.getYear(),req.getTypeParentId(),req.getMonthList());
orgData.setNumber(ObjectUtil.isNull(orgData.getNumber())?0:orgData.getNumber());
orgData.setUseCount(ObjectUtil.isNull(orgData.getUseCount())?0:orgData.getUseCount());
orgData.setFixCount(ObjectUtil.isNull(orgData.getFixCount())?0:orgData.getFixCount());
tjOrgCountList.add(orgData);
}
if (req.getOrgId()!=1369509498032808905L){
TjOrgCountDto orgData =equipmentCountSummaryMapper.TjOrgCountleve4(req.getOrgId(),
req.getTypeIdsList(),req.getSizeNameList(),req.getYear(),req.getTypeParentId(),req.getMonthList(),pubOrg.getLevelFlag());
tjOrgCountList.add(orgData);
}
for (TjOrgCountDto tj:tjOrgCountList) {
tj.setFixCount(ObjectUtil.isNull(tj.getFixCount())?0: tj.getFixCount());
tj.setUseCount(ObjectUtil.isNull(tj.getUseCount())?0: tj.getUseCount());
tj.setNumber(ObjectUtil.isNull(tj.getNumber())?0: tj.getNumber());
finalTjOrgCountDto.setFixCount(finalTjOrgCountDto.getFixCount()+tj.getFixCount());
finalTjOrgCountDto.setUseCount(finalTjOrgCountDto.getUseCount()+ tj.getUseCount());
finalTjOrgCountDto.setNumber(finalTjOrgCountDto.getNumber()+ tj.getNumber());
}
return finalTjOrgCountDto;
}
@Override
public List<TjOrgCountDto> TjOrgCountDetail(TjOrgCountReq req) {
List<TjOrgCountDto> tjOrgCountDtoList=equipmentCountSummaryMapper.TjOrgCountTotalNum(req.getOrgId(),
req.getTypeIdsList(),req.getSizeNameList(),req.getYear(),req.getTypeParentId(),req.getMonthList(),req.getLevelNum());
if (req.getRemoveEmpty()){
tjOrgCountDtoList.removeIf(tjOrgCountDto -> tjOrgCountDto.getNumber()==0 );
}
return tjOrgCountDtoList;
}
@Override
......
......@@ -36,22 +36,22 @@ public class ClearLogAction implements JobAction {
@Override
public void action() {
//获取两月前的日期
// ConfigExpander.getClearLogOffsetValue()
Integer offset = 60;
//Date maxTime = DateUtil.offsetMonth(new Date(), offset);
Date maxTime = DateUtil.offsetDay(new Date(),offset);
//配置过滤条件
LogRequest request = new LogRequest();
request.setLogType(10);
request.setEndDate(DateUtil.formatDate(maxTime));
logManagerApi.clearLog(request);
LogRequest requestType30 = new LogRequest();
requestType30.setLogType(30);
requestType30.setEndDate(DateUtil.formatDate(maxTime));
logManagerApi.clearLog(requestType30);
log.warn(StrUtil.format("{} 清理日志完成",
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT)));
// //获取两月前的日期
//// ConfigExpander.getClearLogOffsetValue()
// Integer offset = 60;
// //Date maxTime = DateUtil.offsetMonth(new Date(), offset);
// Date maxTime = DateUtil.offsetDay(new Date(),offset);
// //配置过滤条件
// LogRequest request = new LogRequest();
// request.setLogType(10);
// request.setEndDate(DateUtil.formatDate(maxTime));
//
// logManagerApi.clearLog(request);
// LogRequest requestType30 = new LogRequest();
// requestType30.setLogType(30);
// requestType30.setEndDate(DateUtil.formatDate(maxTime));
// logManagerApi.clearLog(requestType30);
// log.warn(StrUtil.format("{} 清理日志完成",
// DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT)));
}
}
......@@ -17,7 +17,7 @@ public class MonthEnd implements JobAction{
//月末执行以计算金额
@Override
public void action() {
inventorySummaryService.MonthEndSum();
// inventorySummaryService.MonthEndSum();
}
}
......@@ -17,7 +17,7 @@ public class MonthStart implements JobAction{
//月初执行
@Override
public void action() {
inventorySummaryService.MonthStartSum();
// inventorySummaryService.MonthStartSum();
}
}
......@@ -58,47 +58,53 @@
{call AddEquipmentCountSummary(#{sql,mode=IN})}
</insert>
<select id="TjOrgCount" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgCountDto">
SELECT
t.org_id,
max(t.org_code) as org_code,
max(t.org_name) as org_name,
max(t.parent_id) as parent_id,
max(t.d_name) AS d_name,
select t1.org_id,t1.org_code,t1.org_name,t1.d_name,t2.year,t2.use_count,t2.fix_count,t2.number
FROM(
SELECT
`org_id`, `org_code`, `org_name`, `d_name`
FROM `pub_org`
WHERE org_id=#{orgId}
) as t1
CROSS JOIN (
SELECT
MAX(t.`year`) AS `year`,
SUM(t.use_count) AS use_count,
SUM(t.fix_count) AS fix_count,
sum(CASE WHEN t.month = MONTH(CURRENT_DATE()) THEN t.number ELSE 0 END) AS number
FROM (
SELECT
org_id_int AS org_id,
max(org_code) as org_code,
max(org_name) as org_name,
max(parent_id) as parent_id,
max(org_name_short) AS d_name,
`year`,
`month`,
SUM(use_count) AS use_count,
SUM(fix_count) AS fix_count,
sum(number) as number
FROM vie_equipment_count_summary
where `year`= #{year} and (org_id_int=#{orgId} or parent_id=#{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 org_id,`year`,month
) AS t
GROUP BY
t.org_id
FROM (
SELECT
vecs.`year`,
vecs.`month`,
SUM(vecs.use_count) AS use_count,
SUM(vecs.fix_count) AS fix_count,
sum(vecs.number) as number
FROM vie_equipment_count_summary vecs
left join pub_org po on vecs.org_id_int=po.org_id
where vecs.`year`= #{year} and po.del_flag=1 and (po.org_id=#{orgId} or po.org_parent_ids like CONCAT('%',#{orgId}, '%'))
<if test="typeIdsList!=null and typeIdsList.size() > 0">
and vecs.type_id in
<foreach collection="typeIdsList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="typeParentId != null and typeParentId !=''">
and vecs.type_parnet_id=#{typeParentId}
</if>
<if test="sizeNameList!=null and sizeNameList.size() > 0">
AND
<foreach collection="sizeNameList " item="item" open="(" separator="or" close=")">
vecs.size_name like CONCAT('%', #{item}, '%')
</foreach>
</if>
<if test="monthList != null and monthList.size()>0">
and vecs.month in
<foreach collection="monthList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
GROUP BY `year`,month
) AS t
)as t2
</select>
<select id="TjOrgCountSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgCountDto">
select sum(use_count) as use_count,sum(fix_count) as fix_count,sum(number) as number FROM (
......@@ -276,7 +282,103 @@
</foreach>
</if>
GROUP BY org_id,type_parent_id) as a on a.type_parent_id=et.id
where TRIM(et.parent_ids )='' and et.id !="00000000-0000-0000-0000-000000000000"
where et.parent_id="00000000-0000-0000-0000-000000000000" and et.id !="00000000-0000-0000-0000-000000000000"
GROUP BY et.id,et.name,a.org_id
</select>
<select id="TjOrgCountleve4" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgCountDto">
select t1.org_id,t1.org_code,t1.org_name,t1.d_name,t2.year,t2.use_count,t2.fix_count,t2.number
FROM(
SELECT
`org_id`, `org_code`, `org_name`, `d_name`
FROM `pub_org`
WHERE org_id=#{orgId}
) as t1
CROSS JOIN (
SELECT
MAX(t.`year`) AS `year`,
SUM(t.use_count) AS use_count,
SUM(t.fix_count) AS fix_count,
sum(CASE WHEN t.month = MONTH(CURRENT_DATE()) THEN t.number ELSE 0 END) AS number
FROM (
SELECT
vecs.`year`,
vecs.`month`,
SUM(vecs.use_count) AS use_count,
SUM(vecs.fix_count) AS fix_count,
sum(vecs.number) as number
FROM vie_equipment_count_summary vecs
left join pub_org po on vecs.org_id_int=po.org_id
where vecs.`year`= #{year} and po.del_flag=1 AND (po.org_id = #{orgId} OR (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
AND(case when #{levelFlag} >=3 then 1=1 else SUBSTRING(`po`.`org_code`, 5, 2) = '00' end ))
AND (
`po`.`level_flag` > (
SELECT `level_flag` FROM `pub_org` WHERE `org_id` = #{orgId}
) + 1
OR (`po`.`level_flag` = (
SELECT `level_flag` FROM `pub_org` WHERE `org_id` = #{orgId}
))))
<if test="typeIdsList!=null and typeIdsList.size() > 0">
and vecs.type_id in
<foreach collection="typeIdsList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="typeParentId != null and typeParentId !=''">
and vecs.type_parnet_id=#{typeParentId}
</if>
<if test="sizeNameList!=null and sizeNameList.size() > 0">
AND
<foreach collection="sizeNameList " item="item" open="(" separator="or" close=")">
vecs.size_name like CONCAT('%', #{item}, '%')
</foreach>
</if>
<if test="monthList != null and monthList.size()>0">
and vecs.month in
<foreach collection="monthList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
GROUP BY `year`,month
) AS t
)as t2
</select>
<select id="TjOrgCountTotalNum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgCountDto">
SELECT MAX( t.`year` ) AS `year`,SUM( t.use_count ) AS use_count,SUM( t.fix_count ) AS fix_count,
size_id,size_name,type_id,type_name,
sum( CASE WHEN t.MONTH = MONTH ( CURRENT_DATE ()) THEN t.number ELSE 0 END ) AS number
FROM
(
SELECT
vecs.`year`,
vecs.`month`,
SUM( vecs.use_count ) AS use_count,
SUM( vecs.fix_count ) AS fix_count,
vecs.size_id,
vecs.size_name,
vecs.type_id,
vecs.type_name,
sum( vecs.number ) AS number
FROM
vie_equipment_count_summary vecs
LEFT JOIN pub_org po ON vecs.org_id_int = po.org_id
WHERE
YEAR = #{year}
and `po`.`del_flag` = 1 and (po.org_id=#{orgId} or (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
</if>
))
AND (
`po`.level_flag >(SELECT
level_flag FROM pub_org WHERE org_id = #{orgId} )+ #{levelNum}
OR `po`.level_flag =(SELECT level_flag FROM pub_org WHERE org_id = #{orgId}
))
GROUP BY
`year`,MONTH,size_id,size_name,type_id,type_name
) AS t
GROUP BY
t.size_id,t.size_name,t.type_id,t.type_name
ORDER BY
t.type_id,size_id
</select>
</mapper>
......@@ -288,12 +288,27 @@
<select id="selectSumByItems" resultType="com.junmp.jyzb.entity.InventorySummary">
select id,valuekey,org_id_int as org_id,org_name,org_code,type_id,type_name,size_id,size_name,location_id,location_name,location_type,
number,unit_price,price,stock_number,outbound_number,destruction_price,destruction_number,expire_number,expire_price,
broken_price,broken_number,near_broken_price,near_broken_number,use_number,agent_broken_num,fix_count,use_count,create_time,update_time,threshold
broken_price,broken_number,near_broken_price,near_broken_number,use_number,agent_broken_num,fix_count,use_count,create_time,update_time,threshold,property
from base_inventory_summary where
<foreach collection="list" item="item" separator="or">
(
org_id_int = ${item[0]} AND location_id = '${item[1]}' AND type_id = ${item[2]} AND size_id = '${item[3]}'
AND unit_price = ${item[4]}
)
</foreach>
</select>
<select id="selectSum" resultType="com.junmp.jyzb.entity.InventorySummary">
select id,valuekey,org_id_int as org_id,org_name,org_code,type_id,type_name,size_id,size_name,location_id,location_name,location_type,
number,unit_price,price,stock_number,outbound_number,destruction_price,destruction_number,expire_number,expire_price,
broken_price,broken_number,near_broken_price,near_broken_number,use_number,agent_broken_num,fix_count,use_count,create_time,update_time,threshold,property
from base_inventory_summary where
<foreach collection="list" item="item" separator="or">
(
org_id_int = ${item[0]} AND location_id = '${item[1]}' AND type_id = ${item[2]} AND size_id = '${item[3]}'
AND unit_price = ${item[4]}
and property=${item[5]}
)
</foreach>
......
......@@ -58,7 +58,7 @@
ORDER BY year, month;
</select>
<select id="ShowInOutRecords" resultType="com.junmp.jyzb.entity.LogSummary">
select ls.location_id,ls.location_name,ls.bussiness_type,ls.out_in_state,ls.user_name,a.*
select ls.location_id,ls.use_time,ls.create_time,ls.location_name,ls.bussiness_type,ls.out_in_state,ls.user_name,a.*
from base_log_summary ls
join (select summary_id,count(*)as number,max(size_name) as size_name,
max(type_name) as type_name,max(price)as price
......@@ -75,18 +75,22 @@
</if>
</select>
<select id="ShowInOutRecordsSum" resultType="java.lang.Integer">
select ls.location_id,ls.location_name,ls.bussiness_type,ls.out_in_state,ls.user_name,a.*
from base_log_summary ls
join (select summary_id,count(*)as number,max(size_name) as size_name,
max(type_name) as type_name,max(price)as price
FROM base_log_detail ld
where org_id=#{orgId}
and type_id=#{typeId}
and size_id=#{sizeId}
and price=#{price}
GROUP BY summary_id
) as a on ls.id=a.summary_id
where ls.org_id=#{orgId} and ls.location_type=0
select count(*)
from (select ls.location_id,ls.use_time, ls.location_name, ls.bussiness_type, ls.out_in_state, ls.user_name, a.*
from base_log_summary ls
join (select summary_id,
count(*) as number,
max(size_name) as size_name,
max(type_name) as type_name,
max(price) as price
FROM base_log_detail ld
where org_id = #{orgId}
and type_id = #{typeId}
and size_id = #{sizeId}
and price = #{price}
GROUP BY summary_id) as a on ls.id = a.summary_id
where ls.org_id = #{orgId}
and ls.location_type = 0) as b
</select>
......
......@@ -96,33 +96,33 @@
</if>
</select>
<select id="TjOrgPriceSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgPriceDto">
select sum(coalesce(start_num,0)) as start_num,sum(coalesce(start_price,0)) as start_price,
sum(coalesce(end_num,0)) as end_num,sum(coalesce(end_price,0)) as end_price,
sum(coalesce(add_num,0)) as add_num,sum(coalesce(destory_num,0)) as destory_num,
sum(coalesce(add_price,0)) as add_price,sum(coalesce(destory_price,0)) as destory_price FROM (
select org_id_int as org_id,org_code,org_name,
sum(start_num) as start_num,sum(start_price) as start_price,
sum(end_num) as end_num,sum(end_price) as end_price,
sum(add_num) as add_num,sum(destory_num) as destory_num,
sum(add_price) as add_price,sum(destory_price) as destory_price
FROM vie_price_sum_summary
where `year`= #{year} and (org_id_int=#{orgId} or parent_id=#{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 org_id,org_code,org_name
) as t
</select>
<!-- <select id="TjOrgPriceSum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.FinalTjOrgPriceDto">-->
<!-- select sum(coalesce(start_num,0)) as start_num,sum(coalesce(start_price,0)) as start_price,-->
<!-- sum(coalesce(end_num,0)) as end_num,sum(coalesce(end_price,0)) as end_price,-->
<!-- sum(coalesce(add_num,0)) as add_num,sum(coalesce(destory_num,0)) as destory_num,-->
<!-- sum(coalesce(add_price,0)) as add_price,sum(coalesce(destory_price,0)) as destory_price FROM (-->
<!-- select org_id_int as org_id,org_code,org_name,-->
<!-- sum(start_num) as start_num,sum(start_price) as start_price,-->
<!-- sum(end_num) as end_num,sum(end_price) as end_price,-->
<!-- sum(add_num) as add_num,sum(destory_num) as destory_num,-->
<!-- sum(add_price) as add_price,sum(destory_price) as destory_price-->
<!-- FROM vie_price_sum_summary-->
<!-- where `year`= #{year} and (org_id_int=#{orgId} or parent_id=#{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 org_id,org_code,org_name-->
<!-- ) as t-->
<!-- </select>-->
<select id="TjOrgPriceDetailSum" resultType="java.lang.Integer">
select count(*) from (
select org_id_int as org_id,org_code,org_name,type_id,type_name,
......@@ -188,7 +188,33 @@
) as t2
</select>
<select id="TjOrgPriceTotalNum" resultType="com.junmp.jyzb.api.bean.dto.TjDto.TjOrgPriceDto">
select sum(COALESCE(vpss.start_num,0)) as start_num,sum(COALESCE(vpss.start_price,0)) as start_price,
sum(COALESCE(vpss.end_num,0)) as end_num,sum(COALESCE(vpss.end_price,0)) as end_price,
sum(COALESCE(vpss.add_num,0)) as add_num,sum(COALESCE(vpss.destory_num,0)) as destory_num,
sum(COALESCE(vpss.add_price,0)) as add_price,sum(COALESCE(vpss.destory_price,0)) as destory_price,vpss.type_name,vpss.type_id
FROM vie_price_sum_summary vpss
left join pub_org po on vpss.org_id_int=po.org_id
where vpss.`year`= 2024 and `po`.`del_flag` = 1 and (po.org_id=#{orgId} or (`po`.org_parent_ids like CONCAT('%', #{orgId}, '%')
<if test="levelNum !=0">
AND SUBSTRING(`po`.`org_code`, 5, 2) = '00'
</if>
))
and (`po`.level_flag>(select level_flag FROM pub_org where org_id=#{orgId} )+#{levelNum} or
`po`.level_flag=(select level_flag FROM pub_org where org_id=#{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 vpss.type_id,vpss.type_name
ORDER BY vpss.type_id
</select>
</mapper>
\ No newline at end of file
......@@ -3,7 +3,7 @@ scanner:
easy-es:
enable: true
address: 192.168.2.76:9200
address: 192.168.3.188:9200
username:
password:
......@@ -38,7 +38,7 @@ spring:
redis:
#host: 192.168.3.188
host: 192.168.2.76
host: 192.168.3.121
port: 6379
database: 1
password:
......
......@@ -4,7 +4,7 @@
easy-es:
enable: true
address: 192.168.2.76:9200
address: 192.168.3.188:9200
username:
password:
server:
......@@ -14,14 +14,14 @@ server:
spring:
elasticsearch:
rest:
uris: http://192.168.2.76:9200
uris: http://192.168.3.188:9200
main:
#bea同名类进行注册时,准许覆盖注册
allow-bean-definition-overriding: true
application:
name: jyzb-app
rabbitmq:
host: 192.168.2.76
host: 192.168.3.121
port: 5672
username: root
password: 123456
......
......@@ -361,7 +361,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
quickSuggestionsMapper.updateBusForm(task.getProcessInstanceId());
break;
case "reassignment":
quickSuggestionsMapper.updateReassignment(task.getProcessInstanceId());
break;
}
......
......@@ -12,7 +12,7 @@ public class RabbitMQUtils {
static{
//重量级资源 类加载执行之执行一次
connectionFactory = new ConnectionFactory();
connectionFactory.setHost("192.168.2.76");
connectionFactory.setHost("192.168.3.121");
connectionFactory.setPort(5672);
connectionFactory.setVirtualHost("/");
connectionFactory.setUsername("root");
......
......@@ -8,7 +8,7 @@ import java.io.IOException;
import java.util.concurrent.TimeoutException;
@Component
public class RabbitMQUtils2 {
private static final String host = "192.168.2.76";
private static final String host = "192.168.3.121";
private static final int port = 5672;
private static final String username = "root";
private static final String password = "123456";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论