Merge branch 'dev' of https://gitee.com/jishenghua/JSH_ERP into dev
This commit is contained in:
commit
de95be05f6
@ -996,11 +996,7 @@ public class DepotHeadService {
|
||||
String.format(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_MSG, 4));
|
||||
}
|
||||
}
|
||||
try{
|
||||
depotHeadMapper.insertSelective(depotHead);
|
||||
}catch(Exception e){
|
||||
JshException.writeFail(logger, e);
|
||||
}
|
||||
depotHeadMapper.insertSelective(depotHead);
|
||||
/**入库和出库处理预付款信息*/
|
||||
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPayType())){
|
||||
if(depotHead.getOrganId()!=null) {
|
||||
@ -1094,11 +1090,7 @@ public class DepotHeadService {
|
||||
String.format(ExceptionConstants.DEPOT_HEAD_FILE_NUM_LIMIT_MSG, 4));
|
||||
}
|
||||
}
|
||||
try{
|
||||
depotHeadMapper.updateByPrimaryKeySelective(depotHead);
|
||||
}catch(Exception e){
|
||||
JshException.writeFail(logger, e);
|
||||
}
|
||||
depotHeadMapper.updateByPrimaryKeySelective(depotHead);
|
||||
//如果存在多账户结算需要将原账户的id置空
|
||||
if(StringUtil.isNotEmpty(depotHead.getAccountIdList())) {
|
||||
depotHeadMapperEx.setAccountIdToNull(depotHead.getId());
|
||||
@ -1311,7 +1303,7 @@ public class DepotHeadService {
|
||||
billListCacheVo.setOrganName(dh.getOrganName());
|
||||
billListCacheVo.setOperTimeStr(getCenternTime(dh.getOperTime()));
|
||||
billListCacheVoMap.put(dh.getId(), billListCacheVo);
|
||||
String[] objs = new String[100];
|
||||
String[] objs = new String[sheetOneArr.length];
|
||||
objs[0] = dh.getOrganName();
|
||||
objs[1] = dh.getNumber();
|
||||
objs[2] = dh.getLinkNumber();
|
||||
@ -1328,7 +1320,7 @@ public class DepotHeadService {
|
||||
objs[10] = dh.getRemark();
|
||||
billList.add(objs);
|
||||
}
|
||||
ExcelUtils.exportObjectsWithTitle(wtwb, oneTip, sheetOneArr, "单据列表", 0, billList);
|
||||
ExcelUtils.exportObjectsManySheet(wtwb, oneTip, sheetOneArr, "单据列表", 0, billList);
|
||||
//导出明细数据
|
||||
if(idList.size()>0) {
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemMapperEx.getBillDetailListByIds(idList);
|
||||
@ -1349,7 +1341,7 @@ public class DepotHeadService {
|
||||
String[] sheetTwoArr = StringUtil.listToStringArray(sheetTwoList);
|
||||
List<String[]> billDetail = new ArrayList<>();
|
||||
for (DepotItemVo4WithInfoEx diEx : dataList) {
|
||||
String[] objs = new String[100];
|
||||
String[] objs = new String[sheetTwoArr.length];
|
||||
BillListCacheVo billListCacheVo = billListCacheVoMap.get(diEx.getHeaderId());
|
||||
objs[0] = billListCacheVo != null ? billListCacheVo.getOrganName() : "";
|
||||
objs[1] = billListCacheVo != null ? billListCacheVo.getNumber() : "";
|
||||
@ -1377,7 +1369,7 @@ public class DepotHeadService {
|
||||
objs[22] = diEx.getRemark();
|
||||
billDetail.add(objs);
|
||||
}
|
||||
ExcelUtils.exportObjectsWithTitle(wtwb, twoTip, sheetTwoArr, "单据明细", 1, billDetail);
|
||||
ExcelUtils.exportObjectsManySheet(wtwb, twoTip, sheetTwoArr, "单据明细", 1, billDetail);
|
||||
}
|
||||
wtwb.write();
|
||||
wtwb.close();
|
||||
|
||||
@ -507,7 +507,7 @@ public class MaterialService {
|
||||
List<String[]> objects = new ArrayList<>();
|
||||
if (null != dataList) {
|
||||
for (MaterialVo4Unit m : dataList) {
|
||||
String[] objs = new String[100];
|
||||
String[] objs = new String[names.length];
|
||||
objs[0] = m.getName();
|
||||
objs[1] = m.getStandard();
|
||||
objs[2] = m.getModel();
|
||||
@ -544,7 +544,7 @@ public class MaterialService {
|
||||
objects.add(objs);
|
||||
}
|
||||
}
|
||||
File file = ExcelUtils.exportObjectsWithoutTitle(title, "*导入时本行内容请勿删除,切记!", names, title, objects);
|
||||
File file = ExcelUtils.exportObjectsOneSheet(title, "*导入时本行内容请勿删除,切记!", names, title, objects);
|
||||
ExcelUtils.downloadExcel(file, file.getName(), response);
|
||||
}
|
||||
|
||||
|
||||
@ -582,7 +582,7 @@ public class SupplierService {
|
||||
List<String[]> objects = new ArrayList<String[]>();
|
||||
if (null != dataList) {
|
||||
for (Supplier s : dataList) {
|
||||
String[] objs = new String[10];
|
||||
String[] objs = new String[names.length];
|
||||
objs[0] = s.getSupplier();
|
||||
objs[1] = s.getContacts();
|
||||
objs[2] = s.getTelephone();
|
||||
@ -594,7 +594,7 @@ public class SupplierService {
|
||||
objects.add(objs);
|
||||
}
|
||||
}
|
||||
return ExcelUtils.exportObjectsWithoutTitle(title, "*导入时本行内容请勿删除,切记!", names, title, objects);
|
||||
return ExcelUtils.exportObjectsOneSheet(title, "*导入时本行内容请勿删除,切记!", names, title, objects);
|
||||
}
|
||||
}
|
||||
|
||||
@ -611,7 +611,7 @@ public class SupplierService {
|
||||
List<String[]> objects = new ArrayList<String[]>();
|
||||
if (null != dataList) {
|
||||
for (Supplier s : dataList) {
|
||||
String[] objs = new String[20];
|
||||
String[] objs = new String[names.length];
|
||||
objs[0] = s.getSupplier();
|
||||
objs[1] = s.getContacts();
|
||||
objs[2] = s.getTelephone();
|
||||
@ -634,7 +634,7 @@ public class SupplierService {
|
||||
objects.add(objs);
|
||||
}
|
||||
}
|
||||
return ExcelUtils.exportObjectsWithoutTitle(title, "*导入时本行内容请勿删除,切记!", names, title, objects);
|
||||
return ExcelUtils.exportObjectsOneSheet(title, "*导入时本行内容请勿删除,切记!", names, title, objects);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -504,7 +504,7 @@ public class SystemConfigService {
|
||||
if (null != arr) {
|
||||
for (Object object: arr) {
|
||||
List<Object> list = (List<Object>) object;
|
||||
String[] objs = new String[100];
|
||||
String[] objs = new String[names.length];
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
if(null != list.get(i)) {
|
||||
objs[i] = list.get(i).toString();
|
||||
@ -513,7 +513,7 @@ public class SystemConfigService {
|
||||
objects.add(objs);
|
||||
}
|
||||
}
|
||||
File file = ExcelUtils.exportObjectsWithoutTitle(title, tip, names, title, objects);
|
||||
File file = ExcelUtils.exportObjectsOneSheet(title, tip, names, title, objects);
|
||||
ExcelUtils.downloadExcel(file, file.getName(), response);
|
||||
}
|
||||
}
|
||||
@ -45,9 +45,8 @@ public class ExcelUtils {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void exportObjectsWithTitle(WritableWorkbook wtwb, String tip,
|
||||
String[] names, String title, int index, List<String[]> objects)
|
||||
throws Exception {
|
||||
public static void exportObjectsManySheet(WritableWorkbook wtwb, String tip,
|
||||
String[] names, String title, int index, List<String[]> objects) throws Exception {
|
||||
WritableSheet sheet = wtwb.createSheet(title, index);
|
||||
sheet.getSettings().setDefaultColumnWidth(12);
|
||||
|
||||
@ -72,6 +71,7 @@ public class ExcelUtils {
|
||||
WritableCellFormat format = new WritableCellFormat(wfont);
|
||||
format.setAlignment(Alignment.LEFT);
|
||||
format.setVerticalAlignment(VerticalAlignment.TOP);
|
||||
format.setBorder(jxl.format.Border.ALL,jxl.format.BorderLineStyle.THIN);
|
||||
|
||||
// 第一行写入提示
|
||||
if(com.jsh.erp.utils.StringUtil.isNotEmpty(tip) && tip.contains("*")) {
|
||||
@ -101,7 +101,7 @@ public class ExcelUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel,不需要第一行的title
|
||||
* 导出excel,带单个sheet
|
||||
*
|
||||
* @param fileName
|
||||
* @param names
|
||||
@ -110,9 +110,8 @@ public class ExcelUtils {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static File exportObjectsWithoutTitle(String fileName, String tip,
|
||||
String[] names, String title, List<String[]> objects)
|
||||
throws Exception {
|
||||
public static File exportObjectsOneSheet(String fileName, String tip,
|
||||
String[] names, String title, List<String[]> objects) throws Exception {
|
||||
File excelFile = new File("/opt/"+ fileName);
|
||||
WritableWorkbook wtwb = Workbook.createWorkbook(excelFile);
|
||||
WritableSheet sheet = wtwb.createSheet(title, 0);
|
||||
@ -120,16 +119,14 @@ public class ExcelUtils {
|
||||
|
||||
// 标题的格式-红色
|
||||
WritableFont redWF = new WritableFont(WritableFont.ARIAL, 12,
|
||||
WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE,
|
||||
Colour.RED);
|
||||
WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.RED);
|
||||
WritableCellFormat redWFFC = new WritableCellFormat(redWF);
|
||||
redWFFC.setVerticalAlignment(VerticalAlignment.CENTRE);
|
||||
redWFFC.setBorder(jxl.format.Border.ALL,jxl.format.BorderLineStyle.THIN);
|
||||
|
||||
// 标题的格式-黑色
|
||||
WritableFont blackWF = new WritableFont(WritableFont.ARIAL, 12,
|
||||
WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE,
|
||||
Colour.BLACK);
|
||||
WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK);
|
||||
WritableCellFormat blackWFFC = new WritableCellFormat(blackWF);
|
||||
blackWFFC.setVerticalAlignment(VerticalAlignment.CENTRE);
|
||||
blackWFFC.setBorder(jxl.format.Border.ALL,jxl.format.BorderLineStyle.THIN);
|
||||
@ -139,6 +136,7 @@ public class ExcelUtils {
|
||||
WritableCellFormat format = new WritableCellFormat(wfont);
|
||||
format.setAlignment(Alignment.LEFT);
|
||||
format.setVerticalAlignment(VerticalAlignment.TOP);
|
||||
format.setBorder(jxl.format.Border.ALL,jxl.format.BorderLineStyle.THIN);
|
||||
|
||||
// 第一行写入提示
|
||||
if(StringUtil.isNotEmpty(tip) && tip.contains("*")) {
|
||||
|
||||
@ -610,16 +610,16 @@
|
||||
FROM jsh_material m
|
||||
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
||||
left join jsh_material_current_stock mcs on m.id = mcs.material_id and ifnull(mcs.delete_flag,'0') !='1'
|
||||
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
and me.default_flag=1
|
||||
<if test="depotList.size()>0">
|
||||
and mcs.depot_id in
|
||||
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
and me.default_flag=1
|
||||
<if test="idList.size()>0">
|
||||
and m.category_id in
|
||||
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">
|
||||
@ -655,16 +655,16 @@
|
||||
(select m.id, ifnull(sum(mcs.current_number),0) currentStock from jsh_material m
|
||||
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
||||
left join jsh_material_current_stock mcs on m.id = mcs.material_id and ifnull(mcs.delete_flag,'0') !='1'
|
||||
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
and me.default_flag=1
|
||||
<if test="depotList.size()>0">
|
||||
and mcs.depot_id in
|
||||
<foreach collection="depotList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
|
||||
left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.delete_Flag,'0') !='1'
|
||||
where 1=1
|
||||
and me.default_flag=1
|
||||
<if test="idList.size()>0">
|
||||
and m.category_id in
|
||||
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">
|
||||
|
||||
@ -153,8 +153,7 @@
|
||||
</select>
|
||||
|
||||
<update id="updateUserWithWeixinOpenId">
|
||||
update jsh_user u set u.weixin_open_id = #{weixinOpenId}
|
||||
where u.login_name = #{loginName} and u.password = #{password}
|
||||
and ifnull(u.status,'0') not in('1','2')
|
||||
update jsh_user u set u.weixin_open_id = null where u.weixin_open_id = #{weixinOpenId};
|
||||
update jsh_user u set u.weixin_open_id = #{weixinOpenId} where u.login_name = #{loginName} and u.password = #{password} and ifnull(u.status,'0') not in('1','2');
|
||||
</update>
|
||||
</mapper>
|
||||
@ -1535,12 +1535,15 @@
|
||||
needAddkeywords.push('position')
|
||||
}
|
||||
}
|
||||
let currentCol = [{title:'#',dataIndex:'',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}}]
|
||||
if(record.status === '3') {
|
||||
//部分采购|部分销售的时候显示全部列
|
||||
this.columns = this.defColumns
|
||||
for(let i=0; i<this.defColumns.length; i++){
|
||||
currentCol.push(this.defColumns[i])
|
||||
}
|
||||
this.columns = currentCol
|
||||
} else if(record.purchaseStatus === '3') {
|
||||
//将已出库的标题转为已采购,针对销售订单转采购订单的场景
|
||||
let currentCol = []
|
||||
for(let i=0; i<this.defColumns.length; i++){
|
||||
let info = {}
|
||||
info.title = this.defColumns[i].title
|
||||
@ -1558,7 +1561,6 @@
|
||||
}
|
||||
this.columns = currentCol
|
||||
} else {
|
||||
let currentCol = []
|
||||
for(let i=0; i<this.defColumns.length; i++){
|
||||
//移除列
|
||||
let needRemoveKeywords = ['finishNumber','snList','batchNumber','expirationDate','sku','weight','position']
|
||||
|
||||
@ -442,38 +442,40 @@
|
||||
batchSetStatusUrl: '/accountHead/batchSetStatus'
|
||||
},
|
||||
advanceInColumns: [
|
||||
{ title: '#',dataIndex:'',width:'5%',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}},
|
||||
{ title: '账户名称',dataIndex: 'accountName',width: '30%'},
|
||||
{ title: '金额',dataIndex: 'eachAmount', width: '30%'},
|
||||
{ title: '备注',dataIndex: 'remark', width: '30%'}
|
||||
],
|
||||
giroColumns: [
|
||||
{ title: '#',dataIndex:'',width:'5%',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}},
|
||||
{ title: '账户名称',dataIndex: 'accountName',width: '30%'},
|
||||
{ title: '金额',dataIndex: 'eachAmount', width: '30%'},
|
||||
{ title: '备注',dataIndex: 'remark', width: '30%'}
|
||||
],
|
||||
itemInColumns: [
|
||||
{ title: '#',dataIndex:'',width:'5%',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}},
|
||||
{ title: '收入项目',dataIndex: 'inOutItemName',width: '30%'},
|
||||
{ title: '金额',dataIndex: 'eachAmount', width: '30%'},
|
||||
{ title: '备注',dataIndex: 'remark', width: '30%'}
|
||||
],
|
||||
itemOutColumns: [
|
||||
{ title: '#',dataIndex:'',width:'5%',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}},
|
||||
{ title: '支出项目',dataIndex: 'inOutItemName',width: '30%'},
|
||||
{ title: '金额',dataIndex: 'eachAmount', width: '30%'},
|
||||
{ title: '备注',dataIndex: 'remark', width: '30%'}
|
||||
],
|
||||
moneyInColumns: [
|
||||
{
|
||||
title: '销售单据编号', dataIndex: 'billNumber', width: '20%'
|
||||
},
|
||||
{ title: '#',dataIndex:'',width:'5%',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}},
|
||||
{ title: '销售单据编号', dataIndex: 'billNumber', width: '20%' },
|
||||
{ title: '应收欠款',dataIndex: 'needDebt', width: '10%'},
|
||||
{ title: '已收欠款',dataIndex: 'finishDebt', width: '10%'},
|
||||
{ title: '本次收款',dataIndex: 'eachAmount', width: '10%'},
|
||||
{ title: '备注',dataIndex: 'remark', width: '20%'}
|
||||
],
|
||||
moneyOutColumns: [
|
||||
{
|
||||
title: '采购单据编号', dataIndex: 'billNumber', width: '20%'
|
||||
},
|
||||
{ title: '#',dataIndex:'',width:'5%',align:'center',customRender:function(t,r,index){return parseInt(index)+1;}},
|
||||
{ title: '采购单据编号', dataIndex: 'billNumber', width: '20%' },
|
||||
{ title: '应付欠款',dataIndex: 'needDebt', width: '10%'},
|
||||
{ title: '已付欠款',dataIndex: 'finishDebt', width: '10%'},
|
||||
{ title: '本次付款',dataIndex: 'eachAmount', width: '10%'},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user