md
This commit is contained in:
parent
3df05fa807
commit
9536832a13
@ -11,8 +11,12 @@
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -29,7 +33,6 @@ import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.StringUtils;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisWaybillAjustApply;
|
||||
@ -43,7 +46,7 @@ import com.xdadan.erp.emis.service.IEmisWaybillAjustApplyService;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/emisWaybillAjustApply")
|
||||
public class EmisWaybillAjustApplyController extends BaseController
|
||||
public class EmisWaybillAjustApplyController extends EmisBaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEmisWaybillAjustApplyService emisWaybillAjustApplyService;
|
||||
@ -56,6 +59,18 @@ public class EmisWaybillAjustApplyController extends BaseController
|
||||
public TableDataInfo list(EmisWaybillAjustApply emisWaybillAjustApply)
|
||||
{
|
||||
startPage();
|
||||
|
||||
// 设置通用权限查询参数
|
||||
setPrivParams(emisWaybillAjustApply);
|
||||
|
||||
if(!StringUtils.isEmpty(emisWaybillAjustApply.getBillCode())){
|
||||
emisWaybillAjustApply.setBillCode(WaybillHelper.formatQueryValue(emisWaybillAjustApply.getBillCode()));
|
||||
String[] billCodeSortList = emisWaybillAjustApply.getBillCode().split(",");
|
||||
if(billCodeSortList.length>1){
|
||||
emisWaybillAjustApply.getParams().put("billCodeSortList", Arrays.asList(billCodeSortList));
|
||||
}
|
||||
}
|
||||
|
||||
List<EmisWaybillAjustApply> list = emisWaybillAjustApplyService.selectEmisWaybillAjustApplyList(emisWaybillAjustApply);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ -71,6 +86,7 @@ public class EmisWaybillAjustApplyController extends BaseController
|
||||
@GetMapping("/checkUnique")
|
||||
public AjaxResult checkUnique(EmisWaybillAjustApply emisWaybillAjustApply)
|
||||
{
|
||||
|
||||
int cnt=emisWaybillAjustApplyService.checkUnique(emisWaybillAjustApply);
|
||||
return AjaxResult.success("检查成功",cnt);
|
||||
}
|
||||
|
||||
@ -533,8 +533,6 @@ public class EmisWaybillController extends EmisBaseController
|
||||
{
|
||||
startPage();
|
||||
|
||||
|
||||
|
||||
// 如果单号不为空,则去除其他参数
|
||||
if(!StringUtils.isEmpty(emisWaybill.getBillCode())){
|
||||
emisWaybill.setBillCode(WaybillHelper.formatQueryValue(emisWaybill.getBillCode()));
|
||||
|
||||
@ -81,7 +81,6 @@ public class EmisWaybillAjustApply extends BaseEntity
|
||||
/* 中心审核备注 */
|
||||
private String centerConfirmNote;
|
||||
|
||||
|
||||
// 扩展值
|
||||
private String applyTypeName;
|
||||
private String applyManName;
|
||||
@ -95,5 +94,8 @@ public class EmisWaybillAjustApply extends BaseEntity
|
||||
private String centerConfirmSiteName;
|
||||
private String centerConfirmManName;
|
||||
|
||||
// 扩展参数
|
||||
private EmisWaybill waybillDetail;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisWaybillAjustApplyMapper">
|
||||
|
||||
<resultMap type="EmisWaybillAjustApply" id="EmisWaybillAjustApplyResult">
|
||||
<resultMap type="EmisWaybillAjustApply" id="BaseEmisWaybillAjustApplyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="billCode" column="bill_code" />
|
||||
<result property="applyType" column="apply_type" />
|
||||
@ -29,6 +29,17 @@
|
||||
<result property="centerConfirmNote" column="center_confirm_note" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="EmisWaybillAjustApply" extends="BaseEmisWaybillAjustApplyResult" id="EmisWaybillAjustApplyResult" >
|
||||
<association property="waybillDetail"
|
||||
column="bill_code"
|
||||
select="com.xdadan.erp.emis.mapper.EmisWaybillMapper.selectWaybillBaseInfoByBillCode"
|
||||
fetchType="lazy"
|
||||
/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectEmisWaybillAjustApplyVo">
|
||||
select id, bill_code, apply_type, apply_man_code, apply_site_code, apply_finance_center_code, apply_date, bl_dest_confirmed, dest_confirm_site_code, dest_confirm_date, dest_confirm_note, dest_confirm_man_code, dest_finance_center_code, old_value, new_value, bl_value_json, apply_memo, bl_center_confirmed, center_confirm_site_code, center_confirm_man_code, center_confirm_date, center_confirm_note, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_waybill_ajust_apply
|
||||
</sql>
|
||||
@ -38,7 +49,7 @@
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="billCode != null and billCode != ''"> and bill_code like concat('%', #{billCode}, '%')</if>
|
||||
<if test="billCode != null and billCode != ''"> and ( FIND_IN_SET(`bill_code`,#{billCode}) or bill_code like concat('%', #{billCode}, '%') ) </if>
|
||||
<if test="applyType != null and applyType != ''"> and apply_type = #{applyType}</if>
|
||||
<if test="applyManCode != null and applyManCode != ''"> and apply_man_code = #{applyManCode}</if>
|
||||
<if test="applySiteCode != null and applySiteCode != ''"> and apply_site_code = #{applySiteCode}</if>
|
||||
@ -97,7 +108,45 @@
|
||||
and bl_center_confirmed='2'
|
||||
</if>
|
||||
|
||||
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
||||
and (
|
||||
apply_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
or
|
||||
dest_confirm_site_code in (
|
||||
SELECT t1.site_code FROM (
|
||||
SELECT * FROM emis_site WHERE parent_site_code IS NOT NULL ) t1,( SELECT @pid :=
|
||||
#{params.privSiteCode} ) pd
|
||||
WHERE FIND_IN_SET( parent_site_code, @pid ) > 0 AND @pid := concat(@pid,',',site_code)
|
||||
UNION
|
||||
SELECT #{params.privSiteCode} FROM dual
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
|
||||
</where>
|
||||
ORDER BY
|
||||
<if test="params.orderSnSortList != null and params.orderSnSortList.size >0 ">
|
||||
FIELD
|
||||
<foreach collection="params.orderSnSortList" item="item" open="(order_sn," separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
,
|
||||
</if>
|
||||
<if test="params.billCodeSortList != null and params.billCodeSortList.size >0 ">
|
||||
FIELD
|
||||
<foreach collection="params.billCodeSortList" item="item" open="(bill_code," separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
,
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user