Merge branch 'technology/rakor-w3' into technology-init-lhj1119
# Conflicts: # nflg_project_dev/nflg-technology/src/main/java/com/nflg/product/technology/mapper/master/ProcessRouteTaskProcessesMapper.java # nflg_project_dev/nflg-technology/src/main/resources/mapper/master/ProcessRouteTaskProcessesMapper.xml
This commit is contained in:
commit
7981bf02eb
|
|
@ -62,6 +62,12 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.lettuce</groupId>
|
||||
<artifactId>lettuce-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
package com.nflg.product.technology.mapper.master;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nflg.product.technology.pojo.dto.WorkingHourDTO;
|
||||
import com.nflg.product.technology.pojo.entity.ProcessRouteTaskProcessesEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -18,10 +16,7 @@ import java.util.Set;
|
|||
* @since 2024-11-24
|
||||
*/
|
||||
public interface ProcessRouteTaskProcessesMapper extends BaseMapper<ProcessRouteTaskProcessesEntity> {
|
||||
|
||||
void deleteBatchByIdList(@Param("rowIdList") List<Long> rowIdList);
|
||||
|
||||
Map<String, BigDecimal> getWorkingHours(Set<String> materialNos);
|
||||
|
||||
Map<String, BigDecimal> getWorkingHour(String materialNo);
|
||||
List<WorkingHourDTO> getWorkingHour(String materialNo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,6 @@ public class EBomDTO {
|
|||
*/
|
||||
private String materialUnit;
|
||||
|
||||
/**
|
||||
* 单重
|
||||
*/
|
||||
private BigDecimal unitWeight;
|
||||
|
||||
/**
|
||||
* 最近采购价格
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.nflg.product.technology.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class WorkingHourDTO {
|
||||
|
||||
private String materialWork;
|
||||
|
||||
private BigDecimal workHours = BigDecimal.ZERO;
|
||||
}
|
||||
|
|
@ -78,12 +78,12 @@ public class EBomChildEntity implements Serializable {
|
|||
// @ApiModelProperty(value = "物料分类编码")
|
||||
// private String materialCategoryCode;
|
||||
|
||||
/**
|
||||
* 单重
|
||||
*/
|
||||
@TableField(value = "unit_weight")
|
||||
@ApiModelProperty(value = "单重")
|
||||
private BigDecimal unitWeight;
|
||||
///**
|
||||
// * 单重
|
||||
// */
|
||||
//@TableField(value = "unit_weight")
|
||||
//@ApiModelProperty(value = "单重")
|
||||
//private BigDecimal unitWeight;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.nflg.product.technology.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.nflg.product.base.core.config.BigDecimalSerializer;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -21,6 +24,8 @@ import java.util.List;
|
|||
public class HighValuePurchasedPartsVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("总金额")
|
||||
@JsonFormat(pattern = "#.##")
|
||||
@JsonSerialize(using = BigDecimalSerializer.class)
|
||||
private BigDecimal totalCost = BigDecimal.ZERO;
|
||||
|
||||
@ApiModelProperty("物料列表")
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.nflg.product.technology.pojo.BomCostCalculateConfig;
|
|||
import com.nflg.product.technology.pojo.dto.EBomCostCacheDTO;
|
||||
import com.nflg.product.technology.pojo.dto.EBomDTO;
|
||||
import com.nflg.product.technology.pojo.dto.ProductionCostDTO;
|
||||
import com.nflg.product.technology.pojo.dto.WorkingHourDTO;
|
||||
import com.nflg.product.technology.pojo.entity.EBomChildEntity;
|
||||
import com.nflg.product.technology.pojo.entity.EBomParentEntity;
|
||||
import com.nflg.product.technology.pojo.entity.PaintCostConfigEntity;
|
||||
|
|
@ -93,7 +94,7 @@ public class BomCostCalculateService {
|
|||
.filter(d -> StrUtil.equals(d.getParentMaterialNo(), dto.getMaterialNo()))
|
||||
.collect(Collectors.toList());
|
||||
if (StrUtil.isBlank(cdata)) {
|
||||
Map<String, BigDecimal> workingHours = processRouteTaskProcessesService.getWorkingHour(dto.getMaterialNo());
|
||||
List<WorkingHourDTO> workingHours = processRouteTaskProcessesService.getWorkingHour(dto.getMaterialNo());
|
||||
EBomCostCacheDTO cdto = new EBomCostCacheDTO();
|
||||
cdto.setMaterialNo(dto.getMaterialNo());
|
||||
cdto.setCategoryCode(dto.getMaterialCategoryCode());
|
||||
|
|
@ -171,7 +172,7 @@ public class BomCostCalculateService {
|
|||
}
|
||||
}
|
||||
|
||||
private List<ProductionCostDTO> calculateProductionCosts(EBomDTO d, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private List<ProductionCostDTO> calculateProductionCosts(EBomDTO d, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
List<ProductionCostDTO> productionCosts = new ArrayList<>();
|
||||
BigDecimal hourlyWages;
|
||||
BigDecimal benefit;
|
||||
|
|
@ -204,13 +205,13 @@ public class BomCostCalculateService {
|
|||
private BigDecimal calculatePaintCost(EBomDTO dto) {
|
||||
PaintCostConfigEntity entity = paintCostConfigService.getCost(dto.getGroupName());
|
||||
if (Objects.nonNull(entity)) {
|
||||
return NumberUtil.mul(dto.getUnitWeight(), entity.getCost());
|
||||
return NumberUtil.mul(dto.getNum(), entity.getCost());
|
||||
} else {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
}
|
||||
|
||||
private BigDecimal calculateWorkshopOfficeExpenses(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateWorkshopOfficeExpenses(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal cost = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
cost = cost.add(vw.getWorkshopOfficeFee().multiply(getGsForWorkingType(dto, workHours, vw)));
|
||||
|
|
@ -218,7 +219,7 @@ public class BomCostCalculateService {
|
|||
return cost;
|
||||
}
|
||||
|
||||
private BigDecimal calculateAuxiliaryDepartmentExpenses(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateAuxiliaryDepartmentExpenses(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal cost = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
cost = cost.add(vw.getAssistantFee().multiply(getGsForWorkingType(dto, workHours, vw)));
|
||||
|
|
@ -226,7 +227,7 @@ public class BomCostCalculateService {
|
|||
return cost;
|
||||
}
|
||||
|
||||
private BigDecimal calculateAuxiliaryDepartmentLaborCost(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateAuxiliaryDepartmentLaborCost(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal cost = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
cost = cost.add(vw.getAssistantLaborFee().multiply(getGsForWorkingType(dto, workHours, vw)));
|
||||
|
|
@ -234,7 +235,7 @@ public class BomCostCalculateService {
|
|||
return cost;
|
||||
}
|
||||
|
||||
private BigDecimal calculateWorkshopManagementLaborCost(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateWorkshopManagementLaborCost(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal cost = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
cost = cost.add(vw.getWorkshopLaborFee().multiply(getGsForWorkingType(dto, workHours, vw)));
|
||||
|
|
@ -242,7 +243,7 @@ public class BomCostCalculateService {
|
|||
return cost;
|
||||
}
|
||||
|
||||
private BigDecimal calculateDepreciationCost(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateDepreciationCost(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal cost = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
cost = cost.add(vw.getEquipmentDepreciationFee().multiply(getGsForWorkingType(dto, workHours, vw)));
|
||||
|
|
@ -250,7 +251,7 @@ public class BomCostCalculateService {
|
|||
return cost;
|
||||
}
|
||||
|
||||
private BigDecimal calculateHydropowerCost(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateHydropowerCost(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal cost = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
cost = cost.add(vw.getConsumablesFee().multiply(getGsForWorkingType(dto, workHours, vw)));
|
||||
|
|
@ -258,19 +259,24 @@ public class BomCostCalculateService {
|
|||
return cost;
|
||||
}
|
||||
|
||||
private BigDecimal getGsForWorkingType(EBomDTO dto, Map<String, BigDecimal> workHours, VirtualWorkingItemVO vw) {
|
||||
return workHours.getOrDefault(dto.getMaterialNo() + '-' + vw.getWorkingTypeName(), BigDecimal.ZERO);
|
||||
private BigDecimal getGsForWorkingType(EBomDTO dto, List<WorkingHourDTO> workHours, VirtualWorkingItemVO vw) {
|
||||
String key = dto.getMaterialNo() + '-' + StrUtil.trim(vw.getWorkingTypeName());
|
||||
return workHours.stream()
|
||||
.filter(wh -> wh.getMaterialWork().equals(key))
|
||||
.findFirst()
|
||||
.orElse(new WorkingHourDTO())
|
||||
.getWorkHours();
|
||||
}
|
||||
|
||||
private BigDecimal calculateWelfareExpenses(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculateWelfareExpenses(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
return getTGS(dto, config, workHours).multiply(Optional.ofNullable(config.getManday().getBenefit()).orElse(BigDecimal.ZERO));
|
||||
}
|
||||
|
||||
private BigDecimal calculatePieceRateSalary(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal calculatePieceRateSalary(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
return getTGS(dto, config, workHours).multiply(Optional.ofNullable(config.getManday().getHourlyWages()).orElse(BigDecimal.ZERO));
|
||||
}
|
||||
|
||||
private BigDecimal getTGS(EBomDTO dto, BomCostCalculateConfig config, Map<String, BigDecimal> workHours) {
|
||||
private BigDecimal getTGS(EBomDTO dto, BomCostCalculateConfig config, List<WorkingHourDTO> workHours) {
|
||||
BigDecimal gs = BigDecimal.ZERO;
|
||||
for (VirtualWorkingItemVO vw : config.getVirtualWorkings()) {
|
||||
gs = gs.add(getGsForWorkingType(dto, workHours, vw));
|
||||
|
|
@ -285,7 +291,7 @@ public class BomCostCalculateService {
|
|||
private BigDecimal calculateSteelsCost(EBomDTO dto) {
|
||||
//是钢材
|
||||
BigDecimal price = Optional.ofNullable(dto.getLastPurchasePrice()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal unitWeight = Optional.ofNullable(dto.getUnitWeight()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal unitWeight = Optional.ofNullable(dto.getNum()).orElse(BigDecimal.ZERO);
|
||||
BigDecimal wastage = BigDecimal.ZERO;
|
||||
if (StrUtil.isNotBlank(dto.getGroupName())) {
|
||||
SteelsCostConfigEntity steelsCostConfigEntity = steelsCostConfigService.getCost(dto.getGroupName());
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@ import com.nflg.product.technology.pojo.entity.EBomChildEntity;
|
|||
import com.nflg.product.technology.pojo.entity.EBomParentEntity;
|
||||
import com.nflg.product.technology.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.BoundSetOperations;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.data.redis.core.BoundZSetOperations;
|
||||
import org.springframework.data.redis.core.RedisOperations;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.SessionCallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
|
|
@ -70,7 +71,7 @@ public class EBomService {
|
|||
|
||||
public List<EBomChildEntity> getChildren(long parentRowId) {
|
||||
String key = buildChildCacheKey(parentRowId);
|
||||
Set<String> kvs = redisTemplate.opsForSet().members(key);
|
||||
Set<String> kvs = redisTemplate.opsForZSet().range(key, 0, -1);
|
||||
List<EBomChildEntity> entities = null;
|
||||
if (CollectionUtil.isEmpty(kvs)) {
|
||||
entities = ebomChildService.lambdaQuery()
|
||||
|
|
@ -78,9 +79,19 @@ public class EBomService {
|
|||
.orderByAsc(EBomChildEntity::getOrderNumber)
|
||||
.list();
|
||||
if (CollectionUtil.isNotEmpty(entities)) {
|
||||
BoundSetOperations<String, String> boundSetOps = redisTemplate.boundSetOps(key);
|
||||
boundSetOps.add(entities.stream().map(JsonUtil::toJson).toArray(String[]::new));
|
||||
boundSetOps.expire(CACHE_DURATION_CHILD);
|
||||
Map<String, Double> scoreMembers = new HashMap<>();
|
||||
for (EBomChildEntity entity : entities) {
|
||||
scoreMembers.put(JsonUtil.toJson(entity), Double.valueOf(entity.getOrderNumber()));
|
||||
}
|
||||
redisTemplate.executePipelined(new SessionCallback<Object>() {
|
||||
@Override
|
||||
public Object execute(RedisOperations operations) throws DataAccessException {
|
||||
BoundZSetOperations<String, String> zSetOps = operations.boundZSetOps(key);
|
||||
scoreMembers.forEach(zSetOps::add);
|
||||
zSetOps.expire(CACHE_DURATION_CHILD);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
entities = kvs.stream().map((v) -> JsonUtil.fromJson(v, EBomChildEntity.class)).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@ package com.nflg.product.technology.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nflg.product.technology.mapper.master.ProcessRouteTaskProcessesMapper;
|
||||
import com.nflg.product.technology.pojo.dto.WorkingHourDTO;
|
||||
import com.nflg.product.technology.pojo.entity.ProcessRouteTaskProcessesEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -22,11 +21,7 @@ import java.util.Set;
|
|||
@Service
|
||||
public class ProcessRouteTaskProcessesService extends ServiceImpl<ProcessRouteTaskProcessesMapper, ProcessRouteTaskProcessesEntity> {
|
||||
|
||||
public Map<String, BigDecimal> getWorkingHours(Set<String> materialNos) {
|
||||
return Optional.ofNullable(this.baseMapper.getWorkingHours(materialNos)).orElse(new HashMap<>());
|
||||
}
|
||||
|
||||
public Map<String, BigDecimal> getWorkingHour(String materialNo) {
|
||||
return Optional.ofNullable(this.baseMapper.getWorkingHour(materialNo)).orElse(new HashMap<>());
|
||||
public List<WorkingHourDTO> getWorkingHour(String materialNo) {
|
||||
return Optional.ofNullable(this.baseMapper.getWorkingHour(materialNo)).orElse(Collections.emptyList());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,25 +192,29 @@ public class ProductCostAnalysisService {
|
|||
|
||||
private void buildHighValuePurchasedParts(Long parentRowId, HighValuePurchasedPartsVO pvo, BigDecimal num, BigDecimal price, List<EBomCostCacheDTO> datas) {
|
||||
List<EBomChildEntity> children = ebomService.getChildren(parentRowId);
|
||||
children.parallelStream().forEach(child -> {
|
||||
children.forEach(child -> {
|
||||
EBomCostCacheDTO ccost = datas.stream().filter(d -> StrUtil.equals(d.getMaterialNo(), child.getMaterialNo())).findFirst().orElse(null);
|
||||
BigDecimal tnum = child.getNum().multiply(num);
|
||||
if (ccost.isPurchasedParts() && ccost.getTotalCost().compareTo(price) >= 0) {
|
||||
MaterialCostVO cvo;
|
||||
cvo = pvo.getCosts().stream().filter(v -> StrUtil.equals(v.getMaterialNo(), child.getMaterialNo())).findFirst().orElse(null);
|
||||
if (Objects.isNull(cvo)) {
|
||||
cvo = new MaterialCostVO();
|
||||
cvo.setMaterialNo(child.getMaterialNo());
|
||||
cvo.setPrice(ccost.getTotalCost());
|
||||
cvo.setNum(tnum);
|
||||
pvo.getCosts().add(cvo);
|
||||
} else {
|
||||
cvo.setNum(cvo.getNum().add(tnum));
|
||||
if (Objects.isNull(ccost)) {
|
||||
log.error("没有找到{}的缓存数据", child.getMaterialNo());
|
||||
} else {
|
||||
if (ccost.isPurchasedParts() && ccost.getTotalCost().compareTo(price) >= 0) {
|
||||
MaterialCostVO cvo;
|
||||
cvo = pvo.getCosts().stream().filter(v -> StrUtil.equals(v.getMaterialNo(), child.getMaterialNo())).findFirst().orElse(null);
|
||||
if (Objects.isNull(cvo)) {
|
||||
cvo = new MaterialCostVO();
|
||||
cvo.setMaterialNo(child.getMaterialNo());
|
||||
cvo.setPrice(ccost.getTotalCost());
|
||||
cvo.setNum(tnum);
|
||||
pvo.getCosts().add(cvo);
|
||||
} else {
|
||||
cvo.setNum(cvo.getNum().add(tnum));
|
||||
}
|
||||
}
|
||||
EBomParentEntity cparent = ebomService.getParent(child.getMaterialNo());
|
||||
if (Objects.nonNull(cparent)) {
|
||||
buildHighValuePurchasedParts(cparent.getRowId(), pvo, tnum, price, datas);
|
||||
}
|
||||
}
|
||||
EBomParentEntity cparent = ebomService.getParent(child.getMaterialNo());
|
||||
if (Objects.nonNull(cparent)) {
|
||||
buildHighValuePurchasedParts(cparent.getRowId(), pvo, tnum, price, datas);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ package com.nflg.product.technology.util;
|
|||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import nflg.product.common.constant.STATE;
|
||||
|
||||
@Slf4j
|
||||
public class JsonUtil {
|
||||
|
||||
private static final ObjectMapper objectmapper = new ObjectMapper();
|
||||
|
|
@ -13,6 +15,7 @@ public class JsonUtil {
|
|||
try {
|
||||
return objectmapper.readValue(json, clazz);
|
||||
} catch (JsonProcessingException e) {
|
||||
log.error("JSON反序列化失败", e);
|
||||
throw new NflgBusinessException(STATE.BusinessError, "JSON反序列化失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ nacos:
|
|||
server-addr: 192.168.0.194:8848
|
||||
spring:
|
||||
redis:
|
||||
database: 2
|
||||
database: 3
|
||||
host: 192.168.0.194
|
||||
password:
|
||||
port: 6379
|
||||
|
|
@ -11,8 +11,8 @@ spring:
|
|||
lettuce:
|
||||
pool:
|
||||
max-wait: -1ms
|
||||
max-active: 8
|
||||
max-idle: 8
|
||||
max-active: 100
|
||||
max-idle: 100
|
||||
min-idle: 0
|
||||
logging:
|
||||
config: classpath:logback-sit.xml
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
<?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.nflg.product.technology.mapper.master.ProcessRouteTaskProcessesMapper">
|
||||
|
||||
<delete id="deleteBatchByIdList">
|
||||
delete from t_process_route_task_processes where 1=1
|
||||
AND row_id IN
|
||||
|
|
@ -10,24 +9,7 @@
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getWorkingHours" resultType="java.util.Map">
|
||||
SELECT
|
||||
CONCAT_WS('-',rt.material_no,t.`name`) AS 'material_work',
|
||||
SUM(IFNULL(r.two_work_hours, 0)) work_hours
|
||||
FROM
|
||||
t_technology_working_type t
|
||||
INNER JOIN t_process_workcenter w ON w.working_type = t.`code`
|
||||
INNER JOIN t_process_route_task_processes r ON r.work_center = w.work_center
|
||||
INNER JOIN t_process_route_task rt ON r.task_row_id = rt.row_id
|
||||
WHERE
|
||||
rt.material_no IN
|
||||
<foreach collection="materialNos" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY
|
||||
rt.material_no,t.`name`
|
||||
</select>
|
||||
<select id="getWorkingHour" resultType="java.util.Map">
|
||||
<select id="getWorkingHour" resultType="com.nflg.product.technology.pojo.dto.WorkingHourDTO">
|
||||
SELECT CONCAT_WS('-', rt.material_no, t.`name`) AS 'material_work',
|
||||
SUM(IFNULL(r.two_work_hours, 0)) work_hours
|
||||
FROM t_technology_working_type t
|
||||
|
|
|
|||
Loading…
Reference in New Issue