Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
924765b242
|
|
@ -13,12 +13,14 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
|
|||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新购入库-app
|
||||
*
|
||||
* @author bns_han
|
||||
*/
|
||||
@RestController
|
||||
|
|
@ -58,8 +60,7 @@ public class PurchaseInputController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "新购入库清单明细")
|
||||
@GetMapping(value = "/putinDetails")
|
||||
public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo)
|
||||
{
|
||||
public AjaxResult putinDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
|
||||
try {
|
||||
List<PurchaseMacodeInfo> list = purchaseInputService.selectPutinDetails(purchaseMacodeInfo);
|
||||
return success(list);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
|||
if (StringHelper.isNotEmpty(typeIds)) {
|
||||
String[] splitTypeIds = typeIds.split("@");
|
||||
//先删除,在去添加
|
||||
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||
// warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||
for (String typeId : splitTypeIds) {
|
||||
WarehouseKeeper beans = new WarehouseKeeper();
|
||||
beans.setTypeIds(typeId);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT mt.type_id as modelId ,mt.type_name as modelName,
|
||||
mt2.type_name as typeName,
|
||||
mt4.type_name as kindName,
|
||||
su.user_id as userId, su.nick_name as userName
|
||||
su.user_id as userId,
|
||||
GROUP_CONCAT(su.nick_name) as userName
|
||||
FROM ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||
|
|
@ -36,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeName != null and typeName != ''">
|
||||
AND mt2.type_name like concat('%', #{typeName}, '%')
|
||||
</if>
|
||||
GROUP BY mt.type_id
|
||||
ORDER BY mt.type_id DESC
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,18 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
public String getUserIds() {
|
||||
return userIds;
|
||||
}
|
||||
|
||||
public void setUserIds(String userIds) {
|
||||
this.userIds = userIds;
|
||||
}
|
||||
|
||||
/** 审核员用户id */
|
||||
@ApiModelProperty(value = "审核员用户id")
|
||||
private String userIds;
|
||||
|
||||
/**
|
||||
* 类型管理方式
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -352,41 +352,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</select>
|
||||
<select id="selectPutinDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||
select pcd.production_time productionTime,
|
||||
SELECT
|
||||
pcd.production_time productionTime,
|
||||
mt.type_name specificationType,
|
||||
mt1.type_name typeName,
|
||||
mt.manage_type as manageType,
|
||||
mt.manage_type AS manageType,
|
||||
pmi.ma_code maCode,
|
||||
mm.assets_code assetsCode,
|
||||
pmi.fix_code fixCode,
|
||||
pcd.type_id typeId,
|
||||
pcd.task_id taskId,
|
||||
mt.code specsCode,
|
||||
mt1.code typeCode,
|
||||
mt.CODE specsCode,
|
||||
mt1.CODE typeCode,
|
||||
GROUP_CONCAT( mtk.user_id ) AS userIds,
|
||||
CASE
|
||||
WHEN pmi.ma_code is null THEN
|
||||
WHEN pmi.ma_code IS NULL THEN
|
||||
CASE
|
||||
WHEN pcd.status = 4 THEN 1
|
||||
WHEN pcd.status = 5 THEN 2
|
||||
ELSE 0
|
||||
END
|
||||
ELSE pmi.status
|
||||
END AS status,
|
||||
|
||||
WHEN pcd.STATUS = 4 THEN
|
||||
1
|
||||
WHEN pcd.STATUS = 5 THEN
|
||||
2 ELSE 0
|
||||
END ELSE pmi.STATUS
|
||||
END AS STATUS,
|
||||
mm.qr_code qrCode,
|
||||
mm.ma_id maId,
|
||||
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
||||
from purchase_check_details pcd
|
||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
||||
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
where pcd.task_id = #{taskId}
|
||||
and pcd.`status`!=3 and pcd.`status`!=7
|
||||
IF( pmi.ma_code IS NOT NULL, 1, pcd.check_num ) checkNum
|
||||
FROM
|
||||
purchase_check_details pcd
|
||||
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
|
||||
AND pmi.type_id = pcd.type_id
|
||||
LEFT JOIN ma_machine mm ON pmi.ma_code = mm.ma_code
|
||||
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
LEFT JOIN ma_type_keeper mtk ON mtk.type_id = pcd.type_id
|
||||
WHERE
|
||||
pcd.task_id = #{taskId}
|
||||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != 7
|
||||
<if test="dictName != null and dictName != ''">
|
||||
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||
mt1.type_name like concat('%',#{dictName},'%'))
|
||||
</if>
|
||||
order by status, pmi.id
|
||||
GROUP BY
|
||||
pcd.type_id
|
||||
ORDER BY
|
||||
STATUS,
|
||||
pmi.id
|
||||
</select>
|
||||
<select id="selectMaCode" resultType="java.lang.Integer">
|
||||
select count(ma_id) from ma_machine where ma_code = #{maCode}
|
||||
|
|
|
|||
Loading…
Reference in New Issue