盘点入库详情
This commit is contained in:
parent
85997e5401
commit
6b89c6f089
|
|
@ -58,9 +58,9 @@ public class TokenController {
|
||||||
//web端登录
|
//web端登录
|
||||||
@PostMapping("login")
|
@PostMapping("login")
|
||||||
public R<?> login(@RequestBody LoginBody form) throws Exception {
|
public R<?> login(@RequestBody LoginBody form) throws Exception {
|
||||||
String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
//String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
|
||||||
// 用户登录
|
// 用户登录
|
||||||
LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData);
|
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
|
||||||
String uuid = form.getUuid();
|
String uuid = form.getUuid();
|
||||||
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
||||||
if (StringUtils.isBlank(captcha)) {
|
if (StringUtils.isBlank(captcha)) {
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,17 @@ public class InventoryAndWarehousingController extends BaseController {
|
||||||
return inventoryAndWarehousingService.savePutInfo(dto);
|
return inventoryAndWarehousingService.savePutInfo(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据入库单号查看详情
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据入库单号查看详情")
|
||||||
|
@GetMapping("/getDetail")
|
||||||
|
public TableDataInfo getDetail(PutInStorageBean bean) {
|
||||||
|
startPage();
|
||||||
|
List<PutInStorageBean> list = inventoryAndWarehousingService.getDetails(bean);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 入库盘点
|
* @description 入库盘点
|
||||||
|
|
@ -44,6 +43,10 @@ public class PutInStorageBean extends BaseEntity {
|
||||||
@ApiModelProperty(value = "盘点入库单号")
|
@ApiModelProperty(value = "盘点入库单号")
|
||||||
private String kindName;
|
private String kindName;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
@ApiModelProperty(value = "设备编号")
|
||||||
|
private String maCode;
|
||||||
|
|
||||||
/** 单位ID */
|
/** 单位ID */
|
||||||
@ApiModelProperty(value = "单位ID")
|
@ApiModelProperty(value = "单位ID")
|
||||||
private String unitId;
|
private String unitId;
|
||||||
|
|
@ -85,6 +88,10 @@ public class PutInStorageBean extends BaseEntity {
|
||||||
@ApiModelProperty(value = "设备工器具类型名称")
|
@ApiModelProperty(value = "设备工器具类型名称")
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
private String typeModelName;
|
||||||
|
|
||||||
/** 设备主键 */
|
/** 设备主键 */
|
||||||
@ApiModelProperty(value = "设备主键")
|
@ApiModelProperty(value = "设备主键")
|
||||||
private Integer machine;
|
private Integer machine;
|
||||||
|
|
|
||||||
|
|
@ -74,4 +74,11 @@ public interface InventoryAndWarehousingMapper {
|
||||||
int selectTaskNumByMonth(@Param("date") Date nowDate);
|
int selectTaskNumByMonth(@Param("date") Date nowDate);
|
||||||
|
|
||||||
int selectByCode(String code);
|
int selectByCode(String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据入库单号查看详情
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PutInStorageBean> getDetails(PutInStorageBean bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,11 @@ public interface InventoryAndWarehousingService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult savePutInfo(SavePutInfoDto dto);
|
AjaxResult savePutInfo(SavePutInfoDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据入库单号查看详情
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PutInStorageBean> getDetails(PutInStorageBean bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,16 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
|
||||||
return AjaxResult.success(res);
|
return AjaxResult.success(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据入库单号查看详情
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PutInStorageBean> getDetails(PutInStorageBean bean) {
|
||||||
|
return inventoryAndWarehousingMapper.getDetails(bean);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据code从ma_machine表查询是否有数据,去重
|
* 根据code从ma_machine表查询是否有数据,去重
|
||||||
* @param code
|
* @param code
|
||||||
|
|
|
||||||
|
|
@ -198,35 +198,50 @@
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getList" resultType="com.bonus.sgzb.material.domain.PutInStorageBean">
|
<select id="getList" resultType="com.bonus.sgzb.material.domain.PutInStorageBean">
|
||||||
SELECT pisi.PUT_IN_TYPE as putInType,
|
SELECT
|
||||||
lot.lot_name as projectName,
|
sub.putInType,
|
||||||
bui.unit_name as unitName,
|
sub.projectName,
|
||||||
pisi.`CODE` as kindName,
|
sub.unitName,
|
||||||
mt2.type_name as typeName,
|
sub.kindName,
|
||||||
su.user_name as modelName,
|
sub.typeName,
|
||||||
pisi.CREATE_DATE as createDate,
|
sub.modelName,
|
||||||
pisi.REMARKS as remark
|
sub.createDate,
|
||||||
FROM ma_type_put_in_storage_info pisi
|
sub.remark
|
||||||
LEFT JOIN ma_type_put_in_storage_details pisd on pisi.id = pisd.INFO
|
FROM (
|
||||||
LEFT JOIN bm_project_lot lot on lot.lot_id = pisi.PROJECT_ID
|
SELECT
|
||||||
LEFT JOIN bm_unit_info bui on bui.unit_id = pisi.UNIT_ID
|
pisi.PUT_IN_TYPE AS putInType,
|
||||||
LEFT JOIN ma_type mt on mt.type_id = pisd.TYPE
|
lot.lot_name AS projectName,
|
||||||
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
bui.unit_name AS unitName,
|
||||||
LEFT JOIN sys_user su on su.user_id = pisi.CREATOR
|
pisi.`CODE` AS kindName,
|
||||||
where
|
mt2.type_name AS typeName,
|
||||||
|
su.user_name AS modelName,
|
||||||
|
pisi.CREATE_DATE AS createDate,
|
||||||
|
pisi.REMARKS AS remark,
|
||||||
|
ROW_NUMBER() OVER (PARTITION BY pisi.`CODE` ORDER BY pisi.CREATE_DATE DESC) AS row_num
|
||||||
|
FROM
|
||||||
|
ma_type_put_in_storage_info pisi
|
||||||
|
LEFT JOIN ma_type_put_in_storage_details pisd ON pisi.id = pisd.INFO
|
||||||
|
LEFT JOIN bm_project_lot lot ON lot.lot_id = pisi.PROJECT_ID
|
||||||
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = pisi.UNIT_ID
|
||||||
|
LEFT JOIN ma_type mt ON mt.type_id = pisd.TYPE
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
LEFT JOIN sys_user su ON su.user_id = pisi.CREATOR
|
||||||
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
AND (
|
||||||
pisi.`CODE` like concat('%',#{keyWord},'%') or
|
pisi.`CODE` LIKE CONCAT('%',#{keyWord},'%') OR
|
||||||
pisi.PUT_IN_TYPE like concat('%',#{keyWord},'%') or
|
pisi.PUT_IN_TYPE LIKE CONCAT('%',#{keyWord},'%') OR
|
||||||
lot.lot_name like concat('%',#{keyWord},'%') or
|
lot.lot_name LIKE CONCAT('%',#{keyWord},'%') OR
|
||||||
bui.unit_name like concat('%',#{keyWord},'%') or
|
bui.unit_name LIKE CONCAT('%',#{keyWord},'%') OR
|
||||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
mt2.type_name LIKE CONCAT('%',#{keyWord},'%') OR
|
||||||
su.user_name like concat('%',#{keyWord},'%') or
|
su.user_name LIKE CONCAT('%',#{keyWord},'%') OR
|
||||||
pisi.REMARKS like concat('%',#{keyWord},'%')
|
pisi.REMARKS LIKE CONCAT('%',#{keyWord},'%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
order by pisi.CREATE_DATE desc
|
) AS sub
|
||||||
|
WHERE sub.row_num = 1
|
||||||
|
ORDER BY createDate DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectTaskNumByMonth" resultType="java.lang.Integer">
|
<select id="selectTaskNumByMonth" resultType="java.lang.Integer">
|
||||||
select count(*) from ma_type_put_in_storage_info where DATE_FORMAT(CREATE_DATE,'%y%m') = DATE_FORMAT(#{date},'%y%m')
|
select count(*) from ma_type_put_in_storage_info where DATE_FORMAT(CREATE_DATE,'%y%m') = DATE_FORMAT(#{date},'%y%m')
|
||||||
|
|
@ -238,4 +253,37 @@
|
||||||
<if test="code != null ">and qr_code = #{code}</if>
|
<if test="code != null ">and qr_code = #{code}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getDetails" resultType="com.bonus.sgzb.material.domain.PutInStorageBean">
|
||||||
|
SELECT
|
||||||
|
pisi.`CODE` as kindName,
|
||||||
|
pisi.PUT_IN_TYPE as putInType,
|
||||||
|
pisd.MACODE as maCode,
|
||||||
|
pisd.NUM as num,
|
||||||
|
mt2.type_name as typeName,
|
||||||
|
mt.type_name as typeModelName,
|
||||||
|
su.user_name as modelName,
|
||||||
|
pisi.CREATE_DATE as createDate
|
||||||
|
FROM ma_type_put_in_storage_info pisi
|
||||||
|
LEFT JOIN ma_type_put_in_storage_details pisd on pisi.id = pisd.INFO
|
||||||
|
LEFT JOIN bm_project_lot lot on lot.lot_id = pisi.PROJECT_ID
|
||||||
|
LEFT JOIN bm_unit_info bui on bui.unit_id = pisi.UNIT_ID
|
||||||
|
LEFT JOIN ma_type mt on mt.type_id = pisd.TYPE
|
||||||
|
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
|
||||||
|
LEFT JOIN sys_user su on su.user_id = pisi.CREATOR
|
||||||
|
where
|
||||||
|
1 = 1
|
||||||
|
<if test="kindName != null and kindName != ''">
|
||||||
|
and pisi.`CODE` = #{kindName}
|
||||||
|
</if>
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and (
|
||||||
|
pisi.PUT_IN_TYPE like concat('%',#{keyWord},'%') or
|
||||||
|
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||||
|
su.user_name like concat('%',#{keyWord},'%') or
|
||||||
|
mt.type_name like concat('%',#{keyWord},'%') or
|
||||||
|
pisd.MACODE like concat('%',#{keyWord},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
order by pisi.CREATE_DATE desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue