Compare commits

..

No commits in common. "1144d4692a72467ffc4fee03232585d02a11dc0c" and "5c08e5f5e2fe70ae0a8c4b2846ff9e0d296c957f" have entirely different histories.

7 changed files with 18 additions and 62 deletions

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;
import java.math.BigDecimal;
@ -17,8 +18,7 @@ import java.util.List;
* @author 艾楷
*/
@TableName("sf_handling_group_amount_specifications")
@KeySequence("sf_handling_group_amount_specifications_seq")
// 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@KeySequence("sf_handling_group_amount_specifications_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ -40,11 +40,6 @@ public class HandlingGroupAmountSpecificationsDO extends BaseDO {
* 搬运规格id
*/
private Long handlingSpecificationsId;
/**
* 搬运规格名称
*/
@TableField(exist = false)
private String handlingSpecificationsName;
/**
* 搬运组id
*/

View File

@ -50,11 +50,4 @@ public interface HandlingGroupMapper extends BaseMapperX<HandlingGroupDO> {
* @return
*/
IPage<HandlingGroupAmountSpecificationsVO> selectPageListByDateStr(@Param("page") Page<Object> page, @Param("vo") HandlingGroupAmountSpecificationsPageReqDTO vo);
/**
*
* @param id
* @return
*/
HandlingGroupDO getHandlingGroup(@Param("id") Long id);
}

View File

@ -44,11 +44,4 @@ public interface HandlingSpecificationsMapper extends BaseMapperX<HandlingSpecif
* @return
*/
List<HandlingSpecificationsDO> getHandlingSpecificationsList(@Param("vo") HandlingSpecificationsPageReqVO vo);
/**
*
* @param id
* @return
*/
HandlingSpecificationsDO getHandlingSpecifications(@Param("id") Long id);
}

View File

@ -51,7 +51,7 @@ public class HandlingGroupServiceImpl extends ServiceImpl<HandlingGroupMapper, H
@Override
public HandlingGroupDO getHandlingGroup(Long id) {
return handlingGroupMapper.getHandlingGroup(id);
return handlingGroupMapper.selectById(id);
}
@Override

View File

@ -64,7 +64,7 @@ public class HandlingSpecificationsServiceImpl extends ServiceImpl<HandlingSpeci
@Override
public HandlingSpecificationsDO getHandlingSpecifications(Long id) {
return handlingSpecificationsMapper.getHandlingSpecifications(id);
return handlingSpecificationsMapper.selectById(id);
}
@Override

View File

@ -12,13 +12,11 @@
<select id="selectPageList"
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroup.HandlingGroupDO">
select
a.*,
b.short_name as factoryName
a.*,
b.short_name as factoryName
from sf_handling_group a
left join sf_factory_info as b on a.factory_id = b.id
<where>
a.deleted = 0
and b.deleted = 0
<if test="vo.factoryId != null">
and a.factory_id = #{vo.factoryId}
</if>
@ -28,8 +26,7 @@
</where>
</select>
<resultMap id="handlingSummaryMap"
type="cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsVO">
<resultMap id="handlingSummaryMap" type="cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsVO">
<!-- 基础字段映射 -->
<id property="id" column="id"/>
<result property="factoryId" column="factory_id"/>
@ -71,16 +68,16 @@
SUM( a.amount ) AS totalAmount,
sum( a.total_count ) AS totalNum,
JSON_ARRAYAGG(
JSON_OBJECT(
'handlingSpecificationsId', a.handling_specifications_id,
'totalCount', a.total_count,
'amount', a.amount,
'handlingSpecificationsName', (
SELECT hs.specifications_name
FROM sf_handling_specifications as hs
WHERE hs.id = a.handling_specifications_id
)
)
JSON_OBJECT(
'handlingSpecificationsId', a.handling_specifications_id,
'totalCount', a.total_count,
'amount', a.amount,
'handlingSpecificationsName', (
SELECT hs.specifications_name
FROM sf_handling_specifications as hs
WHERE hs.id = a.handling_specifications_id
)
)
) AS specificationDetails
FROM
sf_handling_group_amount_specifications AS a
@ -90,6 +87,7 @@
<where>
a.deleted = 0
and b.deleted = 0
and c.deleted = 0
<if test="vo.factoryId != null">
and a.factory_id = #{vo.factoryId}
</if>
@ -133,13 +131,4 @@
a.date_str,
a.handling_group_id
</select>
<select id="getHandlingGroup"
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroup.HandlingGroupDO">
SELECT a.*,
b.short_name as factoryName
FROM sf_handling_group AS a
left join sf_factory_info as b on a.factory_id = b.id
WHERE a.deleted = 0
and a.id = #{id}
</select>
</mapper>

View File

@ -51,18 +51,4 @@
</if>
</where>
</select>
<select id="getHandlingSpecifications"
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO">
select a.*,
b.short_name as factoryName
from sf_handling_specifications as a
left join sf_factory_info as b on a.factory_id = b.id
<where>
a.deleted = 0
and b.deleted = 0
<if test="id != null">
and a.id = #{id}
</if>
</where>
</select>
</mapper>