zxf 2022-10-01 21:37:45 +08:00
parent ab0a71d9e4
commit 544c731e86
64 changed files with 2328 additions and 171 deletions

View File

@ -1,6 +1,66 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AliAccessStaticViaInstance" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliDeprecation" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AliEqualsAvoidNull" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliMissingOverrideAnnotation" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AliWrapperTypeEquality" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAbstractClassShouldStartWithAbstractNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidApacheBeanUtilsCopy" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidCallStaticSimpleDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidCommentBehindStatement" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidComplexCondition" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidConcurrentCompetitionRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidDoubleOrFloatEqualCompare" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidManuallyCreateThread" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidMissUseOfMathRandom" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidNegationOperator" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidNewDateGetTime" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidPatternCompileInMethod" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidReturnInFinally" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidStartWithDollarAndUnderLineNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaAvoidUseTimer" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaBigDecimalAvoidDoubleConstructor" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaBooleanPropertyShouldNotStartWithIs" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaClassCastExceptionWithSubListToArrayList" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaClassCastExceptionWithToArray" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaClassMustHaveAuthor" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaClassNamingShouldBeCamel" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaCollectionInitShouldAssignCapacity" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaCommentsMustBeJavadocFormat" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaConcurrentExceptionWithModifyOriginSubList" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaConstantFieldShouldBeUpperCase" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaCountDownShouldInFinally" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaDontModifyInForeachCircle" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaEnumConstantsMustHaveComment" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaExceptionClassShouldEndWithException" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaIbatisMethodQueryForList" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaLockShouldWithTryFinally" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaLowerCamelCaseVariableNaming" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaMethodReturnWrapperType" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaMethodTooLong" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPackageNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPojoMustOverrideToString" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPojoMustUsePrimitiveField" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaPojoNoDefaultValue" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaRemoveCommentedCode" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaServiceOrDaoClassShouldEndWithImpl" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaStringConcat" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaSwitchStatement" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaTestClassShouldEndWithTestNaming" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaThreadLocalShouldRemove" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaThreadPoolCreation" enabled="false" level="BLOCKER" enabled_by_default="false" />
<inspection_tool class="AlibabaThreadShouldSetName" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaTransactionMustHaveRollback" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaUndefineMagicConstant" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaUnsupportedExceptionWithModifyAsList" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="AlibabaUseQuietReferenceNotation" enabled="false" level="MAJOR" enabled_by_default="false" />
<inspection_tool class="AlibabaUseRightCaseForDateFormat" enabled="false" level="CRITICAL" enabled_by_default="false" />
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
@ -32,5 +92,6 @@
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
<option name="myAdditionalJavadocTags" value="date" />
</inspection_tool>
<inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="false" level="CRITICAL" enabled_by_default="false" />
</profile>
</component>

View File

@ -23,7 +23,7 @@
<a widget="button" iconCls="icon-edit" onclick="authTask()">创建规则</a>
<a widget="button" iconCls="icon-edit" onclick="updateTask()">修改规则</a>
<a widget="button" iconCls="icon-delete" onclick="deleteTask()">删除</a>
<!--<a widget="button" iconCls="icon-ok" onclick="autoexe()">手动执行</a>-->
<a widget="button" iconCls="icon-ok" onclick="autotask()">手动执行</a>
</div>
<div widget="autosize">
@ -190,6 +190,40 @@
return "其他";
}
}
function autotask(){
var rows=grid.getSelected();//getSelecteds
if(rows==null || rows==''){
aos.alert('请选择一条数据!');
return;
}
if(rows.length>1){
aos.alert('请选择一条数据!');
return;
}
aos.tip('任务开始执行!');
var data={};
data['id']=rows.id;
aos.post({
url:"rush/manualtask/zbtask",
data:data,
success:function(rtnData){
if(rtnData==1){
aos.alert('任务执行完成!');
grid.reload();
}
}
});
}
function autoexe(){
var rows=grid.getSelected();//getSelecteds
if(rows==null || rows==''){

View File

@ -10,6 +10,8 @@
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>
<a widget="button" iconCls="icon-edit" onclick="edit()">批量标记</a>
<a widget="button" iconCls="icon-edit" onclick="updatecontact()">批量修改电话</a>
<a widget="button" iconCls="icon-enabled" onclick="all()">全选</a>
</div>
<div widget="autosize">
@ -268,5 +270,51 @@
grid.selectAll();
}
function updatecontact(){
if(aos.get('mobile').getValue()==''){
aos.alert('需要按照电话号码查找企业!');
return ;
}
var rows=grid.getSelecteds();
if (rows==null||rows==''){
aos.alert('需要勾选企业信息');
return ;
}
var param = {};
param['pageState'] = 'editnew';
param['mobile']=aos.get('mobile').getValue();
aos.showWindow('canvas/tick/updatecontact', param, '420', '450px', '联系方式批量修改', function(params,rtnValue){
var deletecontact = params['deletecontact'];
var updateontact = params['updateontact'];
var state = params['state'];
var name = params['name'];
for(var i=0;rows.length>i;i++) {
var data = {
customer_id: rows[i].customerid,
state: state,
updateontact: updateontact,
name: name,
deletecontact: deletecontact
}
aos.post({
url: "rush/account/updatecontact",
data: data,
success: function (rtnData) {
aos.tip(rtnData);
grid.reload();
}
});
}});
}
</script>
</html>

View File

@ -30,7 +30,7 @@
</br>
<input name="isdeal" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'1',text:'已处理'},{id:'0',text:'待处理'},{id:'2',text:'处理中'}]" label="是否处理">
<input name="cust_type" widget=combox allowinput="f" showNullItem="true"
<input name="cust_type" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'1',text:'十次以上'},{id:'0',text:'异常客户'},{id:'3',text:'销售回访异常'}]" label="客户类型">
<input name="dealtype" widget=combox allowinput="f" showNullItem="true"
data="[{id:'1',text:'分公司处理'},{id:'0',text:'系统处理'}]" label="处理类型">
@ -52,7 +52,7 @@
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-export" onclick="exportExl()">导出</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-export" onclick="exportExl()">导出</a>
<a widget="button" iconCls="icon-import" onclick="importData()" >导入电话数据</a>
</div>
<div widget="autosize">
@ -324,18 +324,14 @@
var cust_tax_code=aos.get('cust_tax_code').value;
var resulttype=aos.get('resulttype').value;
var dealtype=aos.get('dealtype').value;
var base = document.getElementsByTagName("base")[0].href;
var Eurl=base+"operExlData/exportExl";
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var dealbegindate=aos.get('dealbegindate').getValue();
var dealenddate=aos.get('dealenddate').getValue();
var zqlstime = aos.get('zqlstime').getValue();
var zqletime = aos.get('zqletime').getValue();
if(dealbegindate!=""){dealbegindate=dealbegindate+" "+"00:00:00"}
if(dealenddate!=""){dealenddate=dealenddate+" "+"23:59:59"}
if (begindate != ""){
@ -350,16 +346,15 @@
}else{
var begindate=begindate+" "+"00:00:00";
var enddate=enddate+" "+"23:59:59";
Eurl=Eurl+"?searchbegindate="+begindate+"&searchenddate="+enddate+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
Eurl=Eurl+"?zqlstime="+zqlstime+"&zqletime="+zqletime+"&searchbegindate="+begindate+"&searchenddate="+enddate+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
}
}
} else if(enddate!=""){
aos.alert('请选择开始时间!');
return ;
}else{
Eurl=Eurl+"?cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
Eurl=Eurl+"?zqlstime="+zqlstime+"&zqletime="+zqletime+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
}
alert(Eurl);
window.location.href=Eurl;
}

View File

@ -11,6 +11,13 @@
至:
<input name="searchenddate" widget=datechooser allowinput="f" >
<input name="chulibegin" widget=datechooser allowinput="f" label="处理日期">
至:
<input name="chuliend" widget=datechooser allowinput="f" >
<input name="hfbegin" widget=datechooser allowinput="f" label="回访日期">
至:
<input name="hfend" widget=datechooser allowinput="f" >
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
</div>
<div widget="autosize">
@ -47,6 +54,10 @@
function search(){
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var clbegindate=aos.get('chulibegin').getValue();
var clenddate=aos.get('chuliend').getValue();
var hfbegindate=aos.get('hfbegin').getValue();
var hfenddate=aos.get('hfend').getValue();
if (begindate!="")
{
@ -67,7 +78,14 @@
var params={
searchbegindate:begindate,
searchenddate:enddate
searchenddate:enddate,
clbegindate:clbegindate,
clenddate:clenddate,
hfbegindate:hfbegindate,
hfenddate:hfenddate
}
grid.load(params);
@ -82,7 +100,11 @@
var enddate=aos.get('searchenddate').getValue();
var params = {
searchbegindate:begindate,
searchenddate:enddate
searchenddate:enddate,
clbegindate:clbegindate,
clenddate:clenddate,
hfbegindate:hfbegindate,
hfenddate:hfenddate
}
grid.load(params);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,7 +23,7 @@
<a widget="button" iconCls="icon-edit" onclick="authTask()">创建规则</a>
<a widget="button" iconCls="icon-edit" onclick="updateTask()">修改规则</a>
<a widget="button" iconCls="icon-delete" onclick="deleteTask()">删除</a>
<!--<a widget="button" iconCls="icon-ok" onclick="autoexe()">手动执行</a>-->
<a widget="button" iconCls="icon-ok" onclick="autotask()">手动执行</a>
</div>
<div widget="autosize">
@ -190,6 +190,40 @@
return "其他";
}
}
function autotask(){
var rows=grid.getSelected();//getSelecteds
if(rows==null || rows==''){
aos.alert('请选择一条数据!');
return;
}
if(rows.length>1){
aos.alert('请选择一条数据!');
return;
}
aos.tip('任务开始执行!');
var data={};
data['id']=rows.id;
aos.post({
url:"rush/manualtask/zbtask",
data:data,
success:function(rtnData){
if(rtnData==1){
aos.alert('任务执行完成!');
grid.reload();
}
}
});
}
function autoexe(){
var rows=grid.getSelected();//getSelecteds
if(rows==null || rows==''){

View File

@ -10,6 +10,8 @@
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>
<a widget="button" iconCls="icon-edit" onclick="edit()">批量标记</a>
<a widget="button" iconCls="icon-edit" onclick="updatecontact()">批量修改电话</a>
<a widget="button" iconCls="icon-enabled" onclick="all()">全选</a>
</div>
<div widget="autosize">
@ -268,5 +270,51 @@
grid.selectAll();
}
function updatecontact(){
if(aos.get('mobile').getValue()==''){
aos.alert('需要按照电话号码查找企业!');
return ;
}
var rows=grid.getSelecteds();
if (rows==null||rows==''){
aos.alert('需要勾选企业信息');
return ;
}
var param = {};
param['pageState'] = 'editnew';
param['mobile']=aos.get('mobile').getValue();
aos.showWindow('canvas/tick/updatecontact', param, '420', '450px', '联系方式批量修改', function(params,rtnValue){
var deletecontact = params['deletecontact'];
var updateontact = params['updateontact'];
var state = params['state'];
var name = params['name'];
for(var i=0;rows.length>i;i++) {
var data = {
customer_id: rows[i].customerid,
state: state,
updateontact: updateontact,
name: name,
deletecontact: deletecontact
}
aos.post({
url: "rush/account/updatecontact",
data: data,
success: function (rtnData) {
aos.tip(rtnData);
grid.reload();
}
});
}});
}
</script>
</html>

View File

@ -30,7 +30,7 @@
</br>
<input name="isdeal" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'1',text:'已处理'},{id:'0',text:'待处理'},{id:'2',text:'处理中'}]" label="是否处理">
<input name="cust_type" widget=combox allowinput="f" showNullItem="true"
<input name="cust_type" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'1',text:'十次以上'},{id:'0',text:'异常客户'},{id:'3',text:'销售回访异常'}]" label="客户类型">
<input name="dealtype" widget=combox allowinput="f" showNullItem="true"
data="[{id:'1',text:'分公司处理'},{id:'0',text:'系统处理'}]" label="处理类型">
@ -52,7 +52,7 @@
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-export" onclick="exportExl()">导出</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-export" onclick="exportExl()">导出</a>
<a widget="button" iconCls="icon-import" onclick="importData()" >导入电话数据</a>
</div>
<div widget="autosize">
@ -324,18 +324,14 @@
var cust_tax_code=aos.get('cust_tax_code').value;
var resulttype=aos.get('resulttype').value;
var dealtype=aos.get('dealtype').value;
var base = document.getElementsByTagName("base")[0].href;
var Eurl=base+"operExlData/exportExl";
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var dealbegindate=aos.get('dealbegindate').getValue();
var dealenddate=aos.get('dealenddate').getValue();
var zqlstime = aos.get('zqlstime').getValue();
var zqletime = aos.get('zqletime').getValue();
if(dealbegindate!=""){dealbegindate=dealbegindate+" "+"00:00:00"}
if(dealenddate!=""){dealenddate=dealenddate+" "+"23:59:59"}
if (begindate != ""){
@ -350,16 +346,15 @@
}else{
var begindate=begindate+" "+"00:00:00";
var enddate=enddate+" "+"23:59:59";
Eurl=Eurl+"?searchbegindate="+begindate+"&searchenddate="+enddate+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
Eurl=Eurl+"?zqlstime="+zqlstime+"&zqletime="+zqletime+"&searchbegindate="+begindate+"&searchenddate="+enddate+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
}
}
} else if(enddate!=""){
aos.alert('请选择开始时间!');
return ;
}else{
Eurl=Eurl+"?cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
Eurl=Eurl+"?zqlstime="+zqlstime+"&zqletime="+zqletime+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
}
alert(Eurl);
window.location.href=Eurl;
}

View File

@ -11,6 +11,13 @@
至:
<input name="searchenddate" widget=datechooser allowinput="f" >
<input name="chulibegin" widget=datechooser allowinput="f" label="处理日期">
至:
<input name="chuliend" widget=datechooser allowinput="f" >
<input name="hfbegin" widget=datechooser allowinput="f" label="回访日期">
至:
<input name="hfend" widget=datechooser allowinput="f" >
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
</div>
<div widget="autosize">
@ -47,6 +54,10 @@
function search(){
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var clbegindate=aos.get('chulibegin').getValue();
var clenddate=aos.get('chuliend').getValue();
var hfbegindate=aos.get('hfbegin').getValue();
var hfenddate=aos.get('hfend').getValue();
if (begindate!="")
{
@ -67,7 +78,14 @@
var params={
searchbegindate:begindate,
searchenddate:enddate
searchenddate:enddate,
clbegindate:clbegindate,
clenddate:clenddate,
hfbegindate:hfbegindate,
hfenddate:hfenddate
}
grid.load(params);
@ -82,7 +100,11 @@
var enddate=aos.get('searchenddate').getValue();
var params = {
searchbegindate:begindate,
searchenddate:enddate
searchenddate:enddate,
clbegindate:clbegindate,
clenddate:clenddate,
hfbegindate:hfbegindate,
hfenddate:hfenddate
}
grid.load(params);
}

View File

@ -1,3 +1,3 @@
#save ini
#Tue May 17 21:19:50 CST 2022
#Wed Sep 28 22:57:37 CST 2022
deploystamp=1612237236000

View File

@ -23,7 +23,7 @@
<a widget="button" iconCls="icon-edit" onclick="authTask()">创建规则</a>
<a widget="button" iconCls="icon-edit" onclick="updateTask()">修改规则</a>
<a widget="button" iconCls="icon-delete" onclick="deleteTask()">删除</a>
<!--<a widget="button" iconCls="icon-ok" onclick="autoexe()">手动执行</a>-->
<a widget="button" iconCls="icon-ok" onclick="autotask()">手动执行</a>
</div>
<div widget="autosize">
@ -190,6 +190,40 @@
return "其他";
}
}
function autotask(){
var rows=grid.getSelected();//getSelecteds
if(rows==null || rows==''){
aos.alert('请选择一条数据!');
return;
}
if(rows.length>1){
aos.alert('请选择一条数据!');
return;
}
aos.tip('任务开始执行!');
var data={};
data['id']=rows.id;
aos.post({
url:"rush/manualtask/zbtask",
data:data,
success:function(rtnData){
if(rtnData==1){
aos.alert('任务执行完成!');
grid.reload();
}
}
});
}
function autoexe(){
var rows=grid.getSelected();//getSelecteds
if(rows==null || rows==''){

View File

@ -0,0 +1,46 @@
<html login="false" auth="false">
<head>
<meta charset="UTF-8">
<title>工作量列表</title>
</head>
<body style="background-color: #d5e2ec;">
<div style= "position: absolute;width:300px;height:100px;left:40%;top:40%; border: 2px solid; background-color:white ">
<p style ="color:red;text-align:center;">注意:以下数值为催缴人员手动任务量,<br/>影响系统任务自动分配条数,请谨慎修改。</p>
<div style = "text-align:center;" >
<input widget="edit" lable="手动工作量 " name ="count"/>
<a widget="button" iconCls="icon-enabled" style="width:70px;" onclick="save()">保存</a>
</div>
</div>
</body>
<script type="text/javascript">
window.onload=function(){
var params= {}
aos.post({
url:'rush/manualtask/searchcount',
data:params,
success: function(datas){
aos.get('count').setValue(datas.text);
}
});
}
function save(){
var params= {
count : aos.get('count').getValue()
}
aos.post({
url:'rush/manualtask/updatecount',
data:params,
success: function(datas){
if(datas.code=='0000'){
aos.alert(datas.message);
}else{
aos.alert(datas.message);
}
}
});
}
</script>
</html>

View File

@ -10,6 +10,8 @@
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>
<a widget="button" iconCls="icon-edit" onclick="edit()">批量标记</a>
<a widget="button" iconCls="icon-edit" onclick="updatecontact()">批量修改电话</a>
<a widget="button" iconCls="icon-enabled" onclick="all()">全选</a>
</div>
<div widget="autosize">
@ -268,5 +270,51 @@
grid.selectAll();
}
function updatecontact(){
if(aos.get('mobile').getValue()==''){
aos.alert('需要按照电话号码查找企业!');
return ;
}
var rows=grid.getSelecteds();
if (rows==null||rows==''){
aos.alert('需要勾选企业信息');
return ;
}
var param = {};
param['pageState'] = 'editnew';
param['mobile']=aos.get('mobile').getValue();
aos.showWindow('canvas/tick/updatecontact', param, '420', '450px', '联系方式批量修改', function(params,rtnValue){
var deletecontact = params['deletecontact'];
var updateontact = params['updateontact'];
var state = params['state'];
var name = params['name'];
for(var i=0;rows.length>i;i++) {
var data = {
customer_id: rows[i].customerid,
state: state,
updateontact: updateontact,
name: name,
deletecontact: deletecontact
}
aos.post({
url: "rush/account/updatecontact",
data: data,
success: function (rtnData) {
aos.tip(rtnData);
grid.reload();
}
});
}});
}
</script>
</html>

View File

@ -30,7 +30,7 @@
</br>
<input name="isdeal" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'1',text:'已处理'},{id:'0',text:'待处理'},{id:'2',text:'处理中'}]" label="是否处理">
<input name="cust_type" widget=combox allowinput="f" showNullItem="true"
<input name="cust_type" widget=combox allowinput="f" showNullItem="true" multiSelect="true"
data="[{id:'1',text:'十次以上'},{id:'0',text:'异常客户'},{id:'3',text:'销售回访异常'}]" label="客户类型">
<input name="dealtype" widget=combox allowinput="f" showNullItem="true"
data="[{id:'1',text:'分公司处理'},{id:'0',text:'系统处理'}]" label="处理类型">
@ -52,7 +52,7 @@
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-edit" onclick="tianjia()">批量保存</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-export" onclick="exportExl()">导出</a>&nbsp;&nbsp;&nbsp;
<a widget="button" iconCls="icon-export" onclick="exportExl()">导出</a>
<a widget="button" iconCls="icon-import" onclick="importData()" >导入电话数据</a>
</div>
<div widget="autosize">
@ -324,18 +324,14 @@
var cust_tax_code=aos.get('cust_tax_code').value;
var resulttype=aos.get('resulttype').value;
var dealtype=aos.get('dealtype').value;
var base = document.getElementsByTagName("base")[0].href;
var Eurl=base+"operExlData/exportExl";
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var dealbegindate=aos.get('dealbegindate').getValue();
var dealenddate=aos.get('dealenddate').getValue();
var zqlstime = aos.get('zqlstime').getValue();
var zqletime = aos.get('zqletime').getValue();
if(dealbegindate!=""){dealbegindate=dealbegindate+" "+"00:00:00"}
if(dealenddate!=""){dealenddate=dealenddate+" "+"23:59:59"}
if (begindate != ""){
@ -350,16 +346,15 @@
}else{
var begindate=begindate+" "+"00:00:00";
var enddate=enddate+" "+"23:59:59";
Eurl=Eurl+"?searchbegindate="+begindate+"&searchenddate="+enddate+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
Eurl=Eurl+"?zqlstime="+zqlstime+"&zqletime="+zqletime+"&searchbegindate="+begindate+"&searchenddate="+enddate+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
}
}
} else if(enddate!=""){
aos.alert('请选择开始时间!');
return ;
}else{
Eurl=Eurl+"?cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
Eurl=Eurl+"?zqlstime="+zqlstime+"&zqletime="+zqletime+"&cust_name="+encodeURI(encodeURI(cust_name))+"&expstate="+expstate+"&company="+company+"&feedback="+encodeURI(encodeURI(feedback))+"&revenue="+revenue+"&cust_type="+cust_type+"&cust_tax_code="+cust_tax_code+"&dealbegindate="+dealbegindate+"&dealenddate="+dealenddate+"&resulttype="+encodeURI(encodeURI(resulttype))+"&dealtype="+encodeURI(encodeURI(dealtype))+"&istax="+istax+"&ischuli="+ischuli;
}
alert(Eurl);
window.location.href=Eurl;
}

View File

@ -0,0 +1,65 @@
<html login="false" auth="false">
<head>
<title>催缴次数明细</title>
<style>
</style>
</head>
<body>
<div widget="toolbar" style="padding:4px;border:0;">
<!-- style="width:300px;" -->
<input name="rushtime" widget=datechooser allowinput="f" label="催缴日期">
<input name="jftime" widget=datechooser allowinput="f" label=">=缴费日期">
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/companykaohe/hfcountmx">
<div field="cust_name" width="60" align="center" header="客户名称" ></div>
<div field="addtime" width="60" align="center" header="缴费时间"></div>
<div field="kpxm" width="60" align="center" header="开票名称"></div>
<div field="kphjje" width="60" align="center" header="开票金额"></div>
<div field="hfnum" width="60" align="center" header="回访次数"></div>
<div field="custtype" width="60" align="center" header="客户类型"></div>
<div field="ifmz" width="60" align="center" header="是否免征"></div>
<div field="injg" width="60" align="center" header="是否在机柜"></div>
<div field="ifjy" width="60" align="center" header="是否积压"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var begintime =aos.formatDate(new Date(),"yyyy-MM-dd");
aos.get('rushtime').setValue(begintime);
function search(){
var rushtime=aos.get('rushtime').getValue();
var jftime=aos.get('jftime').getValue();
if (rushtime!=""&&jftime!="")
{
var params={
rushtime:rushtime,
jftime:jftime
}
grid.load(params);
}
else {
aos.alert('请选择缴费日期和催缴日期!');
}
}
</script>
</html>

View File

@ -0,0 +1,76 @@
<html login="false" auth="false">
<head>
<title>催缴次数统计</title>
<style>
</style>
</head>
<body>
<div widget="toolbar" style="padding:4px;border:0;">
<!-- style="width:300px;" -->
<input name="rushtime" widget=datechooser allowinput="f" label="催缴日期">
至:
<input name="rushtimeend" widget=datechooser allowinput="f" >
<input name="jftime" widget=datechooser allowinput="f" label="缴费日期">
至:
<input name="jftimeend" widget=datechooser allowinput="f" >
<input name="custtype" widget=combox allowinput="f" style="width: 200px;" showNullItem="true"
data="[{id:'0',text:'服务费'},{id:'1',text:'托管'}]" emptyText="请选择" label="产品类型">
<input name="ifjy" widget=combox allowinput="f" style="width: 200px;" showNullItem="true"
data="[{id:'0',text:'否'},{id:'1',text:'是'}]" emptyText="请选择" label="是否积压">
<input name="ifmz" widget=combox allowinput="f" style="width: 200px;" showNullItem="true"
data="[{id:'0',text:'否'},{id:'1',text:'是'}]" emptyText="请选择" label="是否免征">
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="rush/companykaohe/hfcounttj">
<div field="num" width="60" align="center" header="回访次数" ></div>
<div field="sl" width="60" align="center" header="回访客户量(a)"></div>
<div field="fwf" width="60" align="center" header="服务费当日缴费量(b1)"></div>
<div field="tg" width="60" align="center" header="托管当日缴费量(b2)"></div>
<div field="jfsl" width="60" align="center" header="合计当日缴费(b=b1+b2)"></div>
<div field="tgbl" width="60" align="center" header="托管转化比(b2/a)"></div>
<div field="jfbl" width="60" align="center" header="收取比(b/a)"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var begintime =aos.formatDate(new Date(),"yyyy-MM-dd");
aos.get('rushtime').setValue(begintime);
function search(){
var rushtime=aos.get('rushtime').getValue();
var rushtimeend=aos.get('rushtimeend').getValue();
var jftime=aos.get('jftime').getValue();
var jftimeend=aos.get('jftimeend').getValue();
if (rushtime!=""&&jftime!=""&&jftimeend!=""&&jftimeend!="")
{
var params={
rushtime:rushtime,
rushtimeend:rushtimeend,
jftime:jftime,
jftimeend:jftimeend,
custtype:aos.get('custtype').getValue(),
ifmz:aos.get('ifmz').getValue(),
ifjy:aos.get('ifjy').getValue()
}
grid.load(params);
}
else {
aos.alert('请选择缴费日期和催缴日期!');
}
}
</script>
</html>

View File

@ -11,6 +11,13 @@
至:
<input name="searchenddate" widget=datechooser allowinput="f" >
<input name="chulibegin" widget=datechooser allowinput="f" label="处理日期">
至:
<input name="chuliend" widget=datechooser allowinput="f" >
<input name="hfbegin" widget=datechooser allowinput="f" label="回访日期">
至:
<input name="hfend" widget=datechooser allowinput="f" >
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
</div>
<div widget="autosize">
@ -47,6 +54,10 @@
function search(){
var begindate=aos.get('searchbegindate').getValue();
var enddate=aos.get('searchenddate').getValue();
var clbegindate=aos.get('chulibegin').getValue();
var clenddate=aos.get('chuliend').getValue();
var hfbegindate=aos.get('hfbegin').getValue();
var hfenddate=aos.get('hfend').getValue();
if (begindate!="")
{
@ -67,7 +78,14 @@
var params={
searchbegindate:begindate,
searchenddate:enddate
searchenddate:enddate,
clbegindate:clbegindate,
clenddate:clenddate,
hfbegindate:hfbegindate,
hfenddate:hfenddate
}
grid.load(params);
@ -82,7 +100,11 @@
var enddate=aos.get('searchenddate').getValue();
var params = {
searchbegindate:begindate,
searchenddate:enddate
searchenddate:enddate,
clbegindate:clbegindate,
clenddate:clenddate,
hfbegindate:hfbegindate,
hfenddate:hfenddate
}
grid.load(params);
}

View File

@ -0,0 +1,60 @@
<html login="false">
<head>
<title>预约回访</title>
</head>
<body >
<div widget="toolbar" >
<a widget="button" iconCls="icon-save" id="savebtn" onclick="save" linkToState="editold,editnew">删除</a>
<a widget="button" iconCls="icon-save" id="updatebtn" onclick="update" linkToState="editold,editnew">修改</a>
</div>
<input widget="edit" name="deletecontact" label="原联系电话" readonly="true" />
<br/>
<input widget="edit" name="updateontact" label="现联系电话" />
<br/>
<input widget="edit" name="name" label="联系人" />
<br/>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
var info;
function init(param){
aos.get("deletecontact").setValue(param.mobile);
}
function save(){
var params ={}
var deletecontact = aos.get('deletecontact').getValue();
if(deletecontact==null || deletecontact==''){
aos.alert('需选择约定回访时间!');
return ;
}
params['deletecontact']=deletecontact;
params['state']=0;
CloseWindow(params);
}
function update(){
var params ={}
var deletecontact = aos.get('deletecontact').getValue();
var updateontact = aos.get('updateontact').getValue();
var name = aos.get('name').getValue();
if(updateontact==null || updateontact==''){
aos.alert('更新联系电话不能为空!');
return ;
}
params['deletecontact']=deletecontact;
params['updateontact']=updateontact;
params['name']=name;
params['state']=1;
CloseWindow(params);
}
</script>
</html>

View File

@ -1202,7 +1202,15 @@ public class SatisfacTion {
public List<Map> zql(Params params) {
Object searchbegindate = params.get("searchbegindate");
Object searchenddate = params.get("searchenddate");
Object clbegin = params.get("clbegindate");
Object clend = params.get("clenddate");
Object hfbegin = params.get("hfbegindate");
Object hfend = params.get("hfenddate");
String dateString = "";
String clbeginsql = "";
String clendsql = "";
String hfbeginsql = "";
String hfendsql = "";
String queryString = "";
Map zuzhiMap = zuzhiid();
Object orgauth = zuzhiMap.get("crm_orgid");
@ -1214,10 +1222,29 @@ public List<Map> zql(Params params) {
if (query == 3) {
queryString = " and 1=0";
}
/*if (query == 2|| query==4) {
queryString = " and org_name='"+orgname+"'";
}*/
if (searchbegindate != null) {
dateString = " and to_char(create_time,'yyyy-mm-dd')>='"+searchbegindate+"'"
+ " and to_char(create_time,'yyyy-mm-dd')<='" +searchenddate+"'";
}
if (clbegin != null) {
clbeginsql = " and DEALTIME>='"+clbegin+" 00:00:00'";
}
if (clend != null) {
clendsql = " and DEALTIME<='"+clbegin+" 23:59:59'";
}
if (hfbegin != null) {
hfbeginsql = " and ZXHFTIME>='"+hfbegin+" 00:00:00'";
}
if (hfend != null) {
hfendsql = " and ZXHFTIME<='"+hfend+" 23:59:59'";
}
String sql="select org_name,zongshu,cuowu,weichuli,zhengque,weihuifang,\n" +
"round((zongshu-cuowu-weichuli)/zongshu,4) zhengquelv, round((zongshu-cuowu-weichuli)/zongshu,4)*100||'%' zhengquelvbaifenbi,\n" +
"rank () over ( ORDER BY round((zongshu-cuowu-weichuli)/zongshu,4) DESC ) paiming from (\n" +
@ -1228,12 +1255,16 @@ public List<Map> zql(Params params) {
"sum(case when (state=0 or state=2 ) and zxhfremark is null then 1 else 0 end ) as weichuli\n" +
" from ( " +
" select state,org_id,org_name,zxhfremark,fistback from excustomer_info \n" +
" where fistback in ('联系方式为空','联系方式异常','客户不在本单位') " +dateString +queryString+
" where fistback in ('联系方式为空','联系方式异常','客户不在本单位') " +dateString +queryString+clbeginsql+clendsql+hfbeginsql+hfendsql+
" and ISCANCEL=0 and TJZQL=0 "+
" ) group by org_name)";
List<Map> l=DbHelper.getDbService().queryMapList(sql);
int zongshu = 0;
int zuowu= 0;
int weichuli= 0;
if(l.size()==0){
return null;
}
for(int i=0;i<l.size();i++){
zongshu +=Integer.parseInt(l.get(i).get("zongshu").toString());
zuowu +=Integer.parseInt(l.get(i).get("cuowu").toString());
@ -1242,6 +1273,7 @@ public List<Map> zql(Params params) {
double pingjun=(double)(zongshu-zuowu-weichuli)/zongshu;
BigDecimal B=new BigDecimal(pingjun);
double b4=B.setScale(4,BigDecimal.ROUND_HALF_UP).doubleValue();
float zhuanhuan = (float)b4;
for(int i=0;i<l.size();i++){
if(Double.parseDouble(l.get(i).get("zhengquelv").toString())>=b4){
l.get(i).put("defen",5);
@ -1260,7 +1292,7 @@ public List<Map> zql(Params params) {
}
}
l.get(i).put("pingjun",b4*100+"%");
l.get(i).put("pingjun",zhuanhuan*100+"%");
}
if (query == 2||query==4) {
@ -2180,7 +2212,7 @@ public List<Map> zql(Params params) {
" cutsremark from excustomer_info where fistback in ('联系方式为空','联系方式异常','客户不在本单位') and org_name='"+org_name+"'"+dateString+
" and (zxhfremark in \n" +
" ('联系方式为空','联系方式异常','客户不在本单位') or \n" +
" ((state=0 or state=2 ) and zxhfremark is null) )";
" ((state=0 or state=2 ) and zxhfremark is null) ) and ISCANCEL=0 and TJZQL=0 ";
Map resultMap = DbHelper.getDbService().queryPageMapList(sql, params);
return resultMap;

View File

@ -120,6 +120,7 @@ public class ZqlAction {
/**
* list
*
* @param srouce
* @param key
* @param <T>
@ -148,13 +149,14 @@ public class ZqlAction {
/**
*
*
* @param num
* @param total
* @param scale
* @return
*/
public static String accuracy(double num, double total, int scale) {
if(total>0){
if (total > 0) {
DecimalFormat df = (DecimalFormat) NumberFormat.getInstance();
//可以设置精确几位小数
df.setMaximumFractionDigits(scale);
@ -162,9 +164,110 @@ public class ZqlAction {
df.setRoundingMode(RoundingMode.HALF_UP);
double accuracy_num = num / total * 100;
return df.format(accuracy_num) + "%";
}else{
return 0+ "%";
} else {
return 0 + "%";
}
}
/*计算回访次数相关报表 */
@Request.Post("hfcountmx")
public Map hfcountmx(Params params) {
String rushtime = params.getString("rushtime");
String jftime = params.getString("jftime");
String dateString = "";
if (rushtime != null) {
dateString = " and operate_date>='" + rushtime + " 00:00:00'"
+ " and operate_date<='" + rushtime + " 23:59:59'";
}
String sql = "select b.cust_name ,to_char(c.addtime,'yyyy-mm-dd') addtime,c.kpxm ,c.kphjje ," +
"(select count(1) from rush_log where obj_id=b.id ) hfnum ,decodea.custtype,'0','服务费','1','托管',null,'不在催缴系统了' custtype,decodea.injf,'0','未在机柜','1','机柜','2','机柜' injg," +
"decodea.ifmz,'0','不是免征','1','免征' ifmz, decodeu.IS_TUIFEI,'0','否','1','是' ifjy" +
" from (" +
" select obj_id,injf,custtype,ifmz from rush_log where action='rushfee'" +
dateString + " ) a " +
" left join rush_record b on a.obj_id=b.id " +
" left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_charaddtime,'yyyy-mm-dd'>='"+jftime+"') c on b.customer_id=c.ghf_custid" +
" left join customer_info u on b.customer_id=u.customer_id";
return DbHelper.getDbService().queryPageMapList(sql, params);
}
@Request.Post("hfcounttj")
public Map hfcounttj(Params params) {
Object rushtime = params.get("rushtime");
Object rushtimeend = params.get("rushtimeend");
Object jftime = params.get("jftime");
Object jftimeend = params.get("jftimeend");
Object custtype = params.get("custtype");
Object ifmz = params.get("ifmz");
Object ifjy = params.get("ifjy");
String dateString = "";
String sqljy="";
String sqlmz="";
String sqlcusttype="";
if (rushtime != null) {
dateString = " and operate_date>='" + rushtime + " 00:00:00'"
+ " and operate_date<='" + rushtimeend + " 23:59:59'";
}
if(ifjy!=null){
sqljy=" and u.is_tuifei="+ifjy;
}
if(ifmz!=null){
sqlmz=" and u.ifmz="+ifmz;
}
if( custtype!=null){
sqlcusttype=" and ISSERVICE="+custtype;
}
/* String sql = "\n" +
"select num,count(1) sl, sum( case when jftime is not null then 1 else 0 end ) jfsl," +
"sum( case when custtype=0 and jftime is not null then 1 else 0 end ) fwf , " +
"sum ( case when custtype=1 and jftime is not null then 1 else 0 end) tg," +
"round(sum(case when custtype=1 and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' tgbl," +
"round(sum(case when jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' jfbl" +
" from (" +
" select to_char(c.addtime,'yyyy-mm-dd') jftime ,c.kpxm ,c.kphjje ," +
"(select count(1) from rush_log where obj_id=b.id ) num ,a.custtype " +
" from (" +
" select obj_id,injf,custtype,ifmz from rush_log where action='rushfee'" +
dateString + " ) a " +
" left join rush_record b on a.obj_id=b.id" +
" left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_charaddtime,'yyyy-mm-dd'>='"+jftime+"') c on b.customer_id=c.ghf_custid" +
" left join customer_info u on b.customer_id=u.customer_id where 1=1 "+sqljy+sqlmz +") group by num order by num ";*/
String sql="select num ,count(1) sl, sum( case when jftime is not null then 1 else 0 end ) jfsl," +
" sum( case when kphjje='280.00' and jftime is not null then 1 else 0 end ) fwf , " +
" sum ( case when kphjje!='280.00' and jftime is not null then 1 else 0 end) tg," +
" round(sum(case when kphjje!='280.00' and jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' tgbl," +
" round(sum(case when jftime is not null then 1 else 0 end)/count(1) ,4)*100 ||'%' jfbl" +
" from (" +
" select to_char(c.addtime,'yyyy-mm-dd') jftime ,c.kpxm ,c.kphjje ," +
" (select count(1) from rush_log where obj_id=b.id ) num ,a.custtype " +
" from (" +
" select obj_id,injf,cust_type custtype,ifmz from (" +
" select obj_id,count(1) from rush_log where action='rushfee'" + dateString+
" group by obj_id ) x left join view_info y on x.obj_id=y.id ) a " +
" left join rush_record b on a.obj_id=b.id " +
" left join ( select addtime,kpxm,kphjje,ghf_custid from einvoice_fpkjxx_fptxx where to_char(addtime,'yyyy-mm-dd')>='"+jftime+"' and to_char(addtime,'yyyy-mm-dd')<= '"+jftimeend+"') c on b.customer_id=c.ghf_custid" +
" left join customer_info u on b.customer_id=u.customer_id " +
" where 1=1 " +sqlcusttype+sqlmz+sqljy+
" " +
" ) group by num order by num ";
return DbHelper.getDbService().queryPageMapList(sql, params);
}
}

View File

@ -152,7 +152,7 @@ public class AccountAction {
}
if(null!=mobile){
sql1+=" and a.CUSTOMERID in (select distinct c.customer_id "
+" from v_CUSTOMER_CONTACT c "
+" from v_CUSTOMER_CONTACT_TEST c "
+" where c.mobile='"+mobile+"')";
}
sql = sql+sql1+") z";
@ -308,7 +308,7 @@ public class AccountAction {
}
}
params.put("task_finish_num", taskActFinishNum);
defaultDb.update("update RUSH_TASK_DETAIL t set finish_num={task_finish_num} where #equal(t.id,detail_id) and rownum =1", params);
defaultDb.update("update RUSH_TASK_DETAIL t set finish_num={task_finish_num} where t.id={detail_id} ", params);
//更新分配任务人员任务完成数
if(taskUserFinishNum == null ){
@ -549,23 +549,23 @@ public class AccountAction {
}
}
}
/*重新再补一遍注释 忘了逻辑*/
/* 查询保存的反馈类型是不是需要到分公司异常的反馈类型*/
/*
*//*重新再补一遍注释 忘了逻辑*//*
*//* 查询保存的反馈类型是不是需要到分公司异常的反馈类型*//*
Map feedbacktype = DbHelper.getDbService().queryMap("select id from RUSH_EXFEEDBACK where type='exfeedback' and name=?",feedback_type);
/*这个查询该企业的的详细信息 主要是回访次数 因为十次是一个 节点 需要判断*/
*//*这个查询该企业的的详细信息 主要是回访次数 因为十次是一个 节点 需要判断*//*
Map excustomer=DbHelper.getDbService().queryMap("select org_id,revenueid,end_datechr,count,invoice_addr,legal_person from view_info where customerid=?",customer_id);
/*
*//*我还想知道 需要保存到异常的这个企业是否已经存在
*
* fffddr
* */
* *//*
Map iscunzai = DbHelper.getDbService().queryMap("select id from excustomer_info where customer_id=?",customer_id);
int countObject=Integer.parseInt( excustomer.get("count").toString());
/*9
*//*如果大于等于9次我就给你按照异常处理
* id
*
*
* */
* *//*
if(countObject>=9){
Params tenParams = new Params();
String eid = Guid.g();
@ -593,7 +593,7 @@ public class AccountAction {
tenParams.put("RUSTYPE", "");
tenParams.put("DEALTIME", "");
if(iscunzai==null){
/*这种情况是第一次进去*/
*//*这种情况是第一次进去*//*
insertlog(tenParams);
String sqlString="insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+" values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
@ -601,7 +601,7 @@ public class AccountAction {
}
else{
/* 说明已经存在了 这时候的obj_id 需要存已存在的id。*/
*//* 说明已经存在了 这时候的obj_id 需要存已存在的id。*//*
tenParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(tenParams);
String sqlString="update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
@ -662,8 +662,154 @@ public class AccountAction {
} }
*/
String id = null;
/*重新再补一遍注释 忘了逻辑*/
/* 查询保存的反馈类型是不是需要到分公司异常的反馈类型*/
Map feedbacktype = DbHelper.getDbService().queryMap("select id from RUSH_EXFEEDBACK where type='exfeedback' and name=?",feedback_type);
/*这个查询该企业的的详细信息 主要是回访次数 因为十次是一个 节点 需要判断*/
Map excustomer=DbHelper.getDbService().queryMap("select org_id,revenueid,end_datechr,count,invoice_addr,legal_person, isservice,injf,ifmz from view_info where customerid=?",customer_id);
/*
*
*
* */
Object custtype =excustomer.get("isservice");
Object injf =excustomer.get("injf");
Object ifmz =excustomer.get("ifmz");
if(excustomer!=null&&excustomer.size()>0) {
Map iscunzai = DbHelper.getDbService().queryMap("select id from excustomer_info where customer_id=?", customer_id);
int countObject = Integer.parseInt(excustomer.get("count").toString());
/*9
* id
*
*
* */
if (countObject >= 9) {
Params tenParams = new Params();
String eid = Guid.g();
String lid = Guid.g();
tenParams.put("id", eid);//这个是异常列表的主键id 同时也是插入日志的obj_id
tenParams.put("lid", lid);
tenParams.put("feedback", feedback_type);
tenParams.put("creator_name", creator_name);
tenParams.put("create_date", create_date);
tenParams.put("customer_id", customer_id);
tenParams.put("contacts_info", contacts_info);
tenParams.put("cust_name", cust_name);
tenParams.put("revenueid", excustomer.get("revenueid"));
tenParams.put("org_id", excustomer.get("org_id"));
tenParams.put("org_name", org_name);
tenParams.put("end_date", end_date);
tenParams.put("cust_type", "1");
tenParams.put("state", "0");
tenParams.put("cust_tax_code", cust_tax_code);
tenParams.put("revenuename", revenuename);
tenParams.put("invoice_addr", excustomer.get("invoice_addr"));
tenParams.put("legal_person", excustomer.get("legal_person"));
tenParams.put("CUTSTYPE", "");
tenParams.put("CUTSREMARK", "");
tenParams.put("RUSTYPE", "");
tenParams.put("DEALTIME", "");
if (feedbacktype != null && feedbacktype.size() > 0) {
if (iscunzai == null) {
/*这种情况是第一次进去*/
insertlog(tenParams);
String sqlString = "insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+ " values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
DbHelper.getDbService().update(sqlString, tenParams);
String taskcenter = "insert into rush_task_center (id,task_id,detail_id,task_user_id,user_id,user_name,customer_id,end_date,revenueid,cust_tax_code,customer_name,task_creator_name,org_name,org_id )"
+ "values('{id}','220886594009875812','220886594009875815','220886594009875817','472775138282575026','分公司处理数据','{customer_id}','{end_date}','{revenueid}','{cust_tax_code}','{cust_name}','{creator_name}','{org_name}','{org_id}') ";
DbHelper.getDbService().update(taskcenter, tenParams);
} else {
/* 说明已经存在了 这时候的obj_id 需要存已存在的id。*/
tenParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(tenParams);
String sqlString = "update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
+ "cust_tax_code={cust_tax_code},contacts_info={contacts_info},state={state},revenuename={revenuename},invoice_addr={invoice_addr},legal_person={legal_person},CUTSTYPE={CUTSTYPE},CUTSREMARK={CUTSREMARK},RUSTYPE={RUSTYPE},DEALTIME={DEALTIME} where id =" + iscunzai.get("id");
DbHelper.getDbService().update(sqlString, tenParams);
String taskcenter = "insert into rush_task_center (id,task_id,detail_id,task_user_id,user_id,user_name,customer_id,end_date,revenueid,cust_tax_code,customer_name,task_creator_name,org_name,org_id )"
+ "values('{id}','220886594009875812','220886594009875815','220886594009875817','472775138282575026','分公司处理数据','{customer_id}','{end_date}','{revenueid}','{cust_tax_code}','{cust_name}','{creator_name}','{org_name}','{org_id}') ";
DbHelper.getDbService().update(taskcenter, tenParams);
}
}
else{
if (iscunzai == null) {
/*这种情况是第一次进去*/
insertlog(tenParams);
String sqlString = "insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+ " values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
DbHelper.getDbService().update(sqlString, tenParams);
} else {
/* 说明已经存在了 这时候的obj_id 需要存已存在的id。*/
tenParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(tenParams);
String sqlString = "update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
+ "cust_tax_code={cust_tax_code},contacts_info={contacts_info},state={state},revenuename={revenuename},invoice_addr={invoice_addr},legal_person={legal_person},CUTSTYPE={CUTSTYPE},CUTSREMARK={CUTSREMARK},RUSTYPE={RUSTYPE},DEALTIME={DEALTIME} where id =" + iscunzai.get("id");
DbHelper.getDbService().update(sqlString, tenParams);
}
}
} else {
if (feedbacktype != null && feedbacktype.size() > 0) {
Params feedParams = new Params();
String eid = Guid.g();
String lid = Guid.g();
feedParams.put("id", eid);
feedParams.put("lid", lid);
feedParams.put("feedback", feedback_type);
feedParams.put("creator_name", creator_name);
feedParams.put("create_date", create_date);
feedParams.put("customer_id", customer_id);
feedParams.put("contacts_info", contacts_info);
feedParams.put("cust_name", cust_name);
feedParams.put("revenueid", excustomer.get("revenueid"));
feedParams.put("org_id", excustomer.get("org_id"));
feedParams.put("org_name", org_name);
feedParams.put("end_date", end_date);
feedParams.put("cust_type", "0");
feedParams.put("state", "0");
feedParams.put("cust_tax_code", cust_tax_code);
feedParams.put("revenuename", revenuename);
feedParams.put("invoice_addr", excustomer.get("invoice_addr"));
feedParams.put("legal_person", excustomer.get("legal_person"));
feedParams.put("CUTSTYPE", "");
feedParams.put("CUTSREMARK", "");
feedParams.put("RUSTYPE", "");
feedParams.put("DEALTIME", "");
if (iscunzai == null) {
insertlog(feedParams);
String sqlString = "insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+ " values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
DbHelper.getDbService().update(sqlString, feedParams);
String taskcenter = "insert into rush_task_center (id,task_id,detail_id,task_user_id,user_id,user_name,customer_id,end_date,revenueid,cust_tax_code,customer_name,task_creator_name,org_name,org_id )"
+ "values('{id}','220886594009875812','220886594009875815','220886594009875817','472775138282575026','分公司处理数据','{customer_id}','{end_date}','{revenueid}','{cust_tax_code}','{cust_name}','{creator_name}','{org_name}','{org_id}') ";
DbHelper.getDbService().update(taskcenter, feedParams);
} else {
feedParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(feedParams);
String sqlString = "update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
+ "cust_tax_code={cust_tax_code},contacts_info={contacts_info},state={state},revenuename={revenuename},invoice_addr={invoice_addr},legal_person={legal_person},CUTSTYPE={CUTSTYPE},CUTSREMARK={CUTSREMARK},RUSTYPE={RUSTYPE},DEALTIME={DEALTIME} where id =" + iscunzai.get("id");
DbHelper.getDbService().update(sqlString, feedParams);
String taskcenter = "insert into rush_task_center (id,task_id,detail_id,task_user_id,user_id,user_name,customer_id,end_date,revenueid,cust_tax_code,customer_name,task_creator_name,org_name,org_id )"
+ "values('{id}','220886594009875812','220886594009875815','220886594009875817','472775138282575026','分公司处理数据','{customer_id}','{end_date}','{revenueid}','{cust_tax_code}','{cust_name}','{creator_name}','{org_name}','{org_id}') ";
DbHelper.getDbService().update(taskcenter, feedParams);
}
}
}
}
String id = null;
//substation_id,org_name,cust_tax_code
//,'substation_id','org_name','cust_tax_code'
//新增之前先判断有没有,如果有更新反馈结果和remark和联系人之后增加日志记录
@ -1049,13 +1195,38 @@ public class AccountAction {
@Request.Post("biao")
public void biao(Params params){
public void biao(Params params){
DbHelper.getDbService().updateById("rushfee_task.updatebiaoji",params);
DbHelper.getDbService().updateById("rushfee_task.updatebiaoji",params);
}
}
@Request.Post("updatecontact")
public String updatecontact(Params params){
String creator_id = SessionHelper.getCurrentUserId();
Map admin= DbHelper.getDbService().queryMap("select rush_userid from rush_crmcomp_to_user_relation where rush_userid=? group by rush_userid ", creator_id);
if(admin==null){
return "暂无权限!";
}
String userName=SessionHelper.getCurrentUserName();
String state=params.getString("state");
String name=params.getString("name");
String customer_id=params.getString("customer_id");
String updateontact=params.getString("updateontact");
String deletecontact=params.getString("deletecontact");
String sql="insert into rush_contact(ID,CUSTOMER_ID,ADDR_ID,CONTACT,MOBILE,SOURCE,FLAG,IS_DEFAULT,OPERATOR_NAME) values (?,?,?,?,?,?,?,?,?) ";
if("0".equals(state)){
DbHelper.getDbService().update(sql,Guid.g(),customer_id,1,name,deletecontact,"rush","delete",1,userName);
}
if("1".equals(state)){
DbHelper.getDbService().update(sql,Guid.g(),customer_id,1,name,deletecontact,"rush","delete",1,userName);
DbHelper.getDbService().update(sql,Guid.g(),customer_id,1,name,updateontact,"rush","add",1,userName);
}
return "修啊成功!";
}
/*这个方法用来插入日志的 */
public void insertlog(Params params){

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,8 @@ public class OperExlDataAction {
@SuppressWarnings("rawtypes")
@Request.Get("exportExl")
public void exportExl(Params params) throws UnsupportedEncodingException {
Object zqlstime=params.get("zqlstime");
Object zqletime=params.get("zqletime");
Object cust_type=params.get("cust_type");
Object cust_tax_code=params.get("cust_tax_code");
Object searchbegindate=params.get("searchbegindate");
@ -40,9 +41,14 @@ public class OperExlDataAction {
Object dealenddate=params.get("dealenddate");
Object org_id=params.get("company");
String cust_name=params.getString("cust_name");
String zqltime="";
if(cust_name!=null){
cust_name=URLDecoder.decode(params.getString("cust_name"), "utf-8");
}
if(zqlstime!=null&&zqletime!=null){
zqltime=" and to_char(a.create_time, 'yyyy-mm-dd')>='"+zqlstime+"'"
+" and to_char(a.create_time, 'yyyy-mm-dd')<='"+zqletime+"' and a.fistback in ('联系方式为空','联系方式异常','客户不在本单位') and a.ISCANCEL=0 and a.TJZQL=0 ";
}
Object expstate=params.get("expstate");
Object revenue=params.get("revenue");
String ischuli=params.getString("ischuli");
@ -95,7 +101,8 @@ public class OperExlDataAction {
+" a.cust_tax_code, a.feedback, a.contacts_info, a.end_date,a.state, "
+" to_char(to_date(a.create_date, 'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd') create_date, a.dealtime, a.org_name, a.revenuename, to_char(b.end_date,'yyyy-mm-dd') zuixin ,"
+" case when state = 0 then '待处理' when state = 1 then '已处理' else '处理中' end as ischuli,"
+" case when a.cust_type = 0 then '异常客户' else '十次以上' end as custtype, "
+" case when a.cust_type = 0 then '异常客户' else '十次以上' end as custtype, a.zxhfremark,to_char(a.create_time, 'yyyy-mm-dd hh24:mi:ss') createtime," +
" a.zxhftime, "
+"NVL2(a.remark,a.remark, (select distinct FIRST_VALUE(r.remark) OVER (ORDER BY r.create_date DESC ROWS BETWEEN unbounded preceding AND unbounded following)"
+" from rush_record r "
@ -136,9 +143,15 @@ public class OperExlDataAction {
dealdateString=" and a.dealtime>='"+dealbegindate+"'"
+" and a.dealtime<='"+dealenddate+"'";
}
if(cust_type!=null){
custtype=" and a.cust_type='"+cust_type+"'";
}
if (null!= cust_type) {
String[] str = cust_type.toString().split(",");
for (int i = 0; i < str.length; i++) {
custtype += "'" + str[i] + "',";
}
custtype = " and a.cust_type in ("
+ custtype.substring(0,
custtype.length() - 1) + " )";
}
if(cust_tax_code!=null){
custtaxcode=" and a.cust_tax_code='"+cust_tax_code+"'";
}
@ -167,24 +180,28 @@ public class OperExlDataAction {
+ resulttypesql.substring(0,
resulttypesql.length() - 1) + " )";
}
String sql = sqlString+queryString+company+ischuliString+expstateString+revenueString+custname+dateString+dealdateString+custtype+custtaxcode+feedbackString+resulttypesql+dealtypesql+istaxsql;
String sql = sqlString+queryString+company+zqltime+ischuliString+expstateString+revenueString+custname+dateString+dealdateString+custtype+custtaxcode+feedbackString+resulttypesql+dealtypesql+istaxsql;
sql =sql+" " +
" union all ";
String hfsqlString="select a.id,a.customer_id,a.cust_name,'' as isvalid, a.cust_type,a.cutsremark,a.rustype,decode(a.ISCANCEL,0,'未注销',1,'已注销','未注销') iscancel, "
String hfsqlString=" union all select a.id,a.customer_id,a.cust_name,'' as isvalid, a.cust_type,a.cutsremark,a.rustype,decode(a.ISCANCEL,0,'未注销',1,'已注销','未注销') iscancel, "
+" case when cutstype=0 then '系统处理' when cutstype=1 then '分公司处理' end as cutstype, "
+" case when istaxation=1 then '免征' when istaxation=0 then '否' end as istaxation, "
+" a.cust_tax_code, a.feedback, a.contacts_info, a.end_date,a.state, "
+" to_char(to_date(a.create_date, 'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd') create_date, a.dealtime, a.org_name, a.revenuename, '' as zuixin ,"
+" case when state = 0 then '待处理' when state = 1 then '已处理' else '处理中' end as ischuli,"
+" case when cust_type = 0 then '异常客户' when cust_type = 0 then '十次以上' else '销售回访异常' end as custtype, "
+" case when cust_type = 0 then '异常客户' when cust_type = 0 then '十次以上' else '销售回访异常' end as custtype, '无' AS zxhfremark, '无' AS createtime,"
+ " '无' AS zxhftime, "
+" hf_remark as remark, 1 as rn"
+" from hf_excustomer_info a where 1=1 ";
hfsqlString=hfsqlString+queryString+company+ischuliString+expstateString+revenueString+custname+dateString+dealdateString+custtype+custtaxcode+feedbackString+resulttypesql+dealtypesql+istaxsql;
if(zqlstime!=null&&zqletime!=null){
}else{
sql=sql+hfsqlString;
}
sql=sql+hfsqlString;
sql = "select * from ("+sql+") order by id";
@ -200,11 +217,11 @@ public class OperExlDataAction {
fileName, sheetName);
// Map Key属性
String titleColumn1[] = { "custtype", "cust_name", "cust_tax_code", "feedback","remark","org_name","contacts_info","end_date","zuixin","create_date","revenuename","ischuli","dealtime","cutsremark","cutstype","rustype","iscancel"};
String titleColumn1[] = { "custtype", "cust_name", "cust_tax_code", "feedback","remark","org_name","contacts_info","end_date","zuixin","create_date","revenuename","ischuli","dealtime","cutsremark","cutstype","rustype","iscancel","istaxation","zxhfremark","createtime","zxhftime"};
// Excel列名
String titleName1[] = { "客户类型", "客户名称", "税号", "最后一次反馈结果","备注","分公司","联系方式","到期日期","最新到期日期","创建日期","所属分局","状态","处理日期","信息修改","处理方式","处理结果","是否注销"};
String titleName1[] = { "客户类型", "客户名称", "税号", "最后一次反馈结果","备注","分公司","联系方式","到期日期","最新到期日期","创建日期","所属分局","状态","处理日期","信息修改","处理方式","处理结果","是否注销","是否免征","最新回访结果","初始创建时间","最新回访时间"};
// Excel 列宽
int titleSize[] = { 20, 30, 30, 20,20,20,20,20,20,20,20,20,20,20,20,20,20 };
int titleSize[] = { 20, 30, 30, 20,20,20,20,20,20,20,20,20,20,20,20,20,20 ,20,20,20,20};
// 内容书写,返回输出流
pee.wirteListMapExcel(titleColumn1, titleName1, titleSize, list);

View File

@ -88,7 +88,7 @@ public class PaiGongAction {
@Request.Post("getpaylist")
public Map getList(Params params){
Object ghf_custid=params.get("customer_id");
return DbHelper.getDbService().queryPageMapList("select kpxm,to_char(addtime,'yyyy-mm-dd HH24:MI:SS') addtime,kphjje from einvoice_fpkjxx_fptxx where kplx = 0 and invoicetype='2' and ghf_custid='"+ghf_custid+"'"
return DbHelper.getDbService().queryPageMapList("select kpxm,to_char(addtime,'yyyy-mm-dd HH24:MI:SS') addtime,kphjje from einvoice_fpkjxx_fptxx where ghf_custid='"+ghf_custid+"'"
+" order by addtime desc",params);
}

View File

@ -221,7 +221,7 @@ public class RushAction {
for (int i = 0; i < riqi.length; i++) {
riqiString += "(t.end_date>=RUSH_GET_WhatYouWantDay(0,"
+ riqi[i]
+ " ) and t.end_date<RUSH_GET_WhatYouWantDay(1,"
+ " ) and t.end_date<=RUSH_GET_WhatYouWantDay(1,"
+ riqi[i] + " ))or";
}
riqiString = "and ("

View File

@ -38,7 +38,7 @@ public class RushCompany {
String injf= params.getString("injf");
String ifmz=params.getString("ifmz");
String khlx=params.getString("custtype");
Object cust_type=params.get("cust_type");
String cust_type=params.getString("cust_type");
Object cust_tax_code=params.get("cust_tax_code");
Object searchbegindate=params.get("searchbegindate");
Object searchenddate=params.get("searchenddate");
@ -138,11 +138,22 @@ public class RushCompany {
}
if(zqlstime!=null&&zqletime!=null){
zqltime=" and to_char(a.create_time, 'yyyy-mm-dd')>='"+zqlstime+"'"
+" and to_char(a.create_time, 'yyyy-mm-dd')<='"+zqletime+"' and a.fistback in ('联系方式为空','联系方式异常','客户不在本单位') ";
+" and to_char(a.create_time, 'yyyy-mm-dd')<='"+zqletime+"' and a.fistback in ('联系方式为空','联系方式异常','客户不在本单位') and a.ISCANCEL=0 and a.TJZQL=0 ";
}
if(cust_type!=null){
/* if(cust_type!=null){
custtype=" and a.cust_type='"+cust_type+"'";
}
}*/
if (null!= cust_type) {
String[] str = cust_type.split(",");
for (int i = 0; i < str.length; i++) {
custtype += "'" + str[i] + "',";
}
custtype = " and a.cust_type in ("
+ custtype.substring(0,
custtype.length() - 1) + " )";
}
if(cust_tax_code!=null){
custtaxcode=" and a.cust_tax_code='"+cust_tax_code+"'";
}
@ -197,7 +208,6 @@ public class RushCompany {
hfsqlString=hfsqlString+queryString+company+ischuliString+expstateString+revenueString+custname+dateString+dealdateString+custtype+custtaxcode+feedbackString+resulttypesql+dealtypesql+istaxsql;
sql=sql+hfsqlString;
// sql = "select * from ("+sql+") order by id";
return DbHelper.getDbService().queryPageMapList(sql, params);
}

View File

@ -326,7 +326,7 @@ public class RushTaskCenterAction {
}
}
params.put("task_finish_num", taskActFinishNum);
defaultDb.update("update RUSH_TASK_DETAIL t set finish_num={task_finish_num} where #equal(t.id,detail_id) and rownum =1", params);
defaultDb.update("update RUSH_TASK_DETAIL t set finish_num={task_finish_num} where t.id={detail_id}", params);
//更新分配任务人员任务完成数
if(taskUserFinishNum == null ){
@ -674,21 +674,48 @@ public class RushTaskCenterAction {
tenParams.put("CUTSREMARK", "");
tenParams.put("RUSTYPE", "");
tenParams.put("DEALTIME", "");
if (iscunzai == null) {
/*这种情况是第一次进去*/
insertlog(tenParams);
String sqlString = "insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+ " values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
DbHelper.getDbService().update(sqlString, tenParams);
if (feedbacktype != null && feedbacktype.size() > 0) {
if (iscunzai == null) {
/*这种情况是第一次进去*/
insertlog(tenParams);
String sqlString = "insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+ " values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
DbHelper.getDbService().update(sqlString, tenParams);
String taskcenter = "insert into rush_task_center (id,task_id,detail_id,task_user_id,user_id,user_name,customer_id,end_date,revenueid,cust_tax_code,customer_name,task_creator_name,org_name,org_id )"
+ "values('{id}','220886594009875812','220886594009875815','220886594009875817','472775138282575026','分公司处理数据','{customer_id}','{end_date}','{revenueid}','{cust_tax_code}','{cust_name}','{creator_name}','{org_name}','{org_id}') ";
DbHelper.getDbService().update(taskcenter, tenParams);
} else {
/* 说明已经存在了 这时候的obj_id 需要存已存在的id。*/
tenParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(tenParams);
String sqlString = "update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
+ "cust_tax_code={cust_tax_code},contacts_info={contacts_info},state={state},revenuename={revenuename},invoice_addr={invoice_addr},legal_person={legal_person},CUTSTYPE={CUTSTYPE},CUTSREMARK={CUTSREMARK},RUSTYPE={RUSTYPE},DEALTIME={DEALTIME} where id =" + iscunzai.get("id");
DbHelper.getDbService().update(sqlString, tenParams);
} else {
/* 说明已经存在了 这时候的obj_id 需要存已存在的id。*/
tenParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(tenParams);
String sqlString = "update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
+ "cust_tax_code={cust_tax_code},contacts_info={contacts_info},state={state},revenuename={revenuename},invoice_addr={invoice_addr},legal_person={legal_person},CUTSTYPE={CUTSTYPE},CUTSREMARK={CUTSREMARK},RUSTYPE={RUSTYPE},DEALTIME={DEALTIME} where id =" + iscunzai.get("id");
DbHelper.getDbService().update(sqlString, tenParams);
String taskcenter = "insert into rush_task_center (id,task_id,detail_id,task_user_id,user_id,user_name,customer_id,end_date,revenueid,cust_tax_code,customer_name,task_creator_name,org_name,org_id )"
+ "values('{id}','220886594009875812','220886594009875815','220886594009875817','472775138282575026','分公司处理数据','{customer_id}','{end_date}','{revenueid}','{cust_tax_code}','{cust_name}','{creator_name}','{org_name}','{org_id}') ";
DbHelper.getDbService().update(taskcenter, tenParams);
}
}
else{
if (iscunzai == null) {
/*这种情况是第一次进去*/
insertlog(tenParams);
String sqlString = "insert into excustomer_info (id,customer_id,cust_name,feedback,revenueid,org_id,cust_type,end_date,create_date,org_name,cust_tax_code,contacts_info,state,revenuename,invoice_addr,legal_person,fistback)"
+ " values ('{id}','{customer_id}','{cust_name}','{feedback}','{revenueid}','{org_id}','{cust_type}','{end_date}','{create_date}','{org_name}','{cust_tax_code}','{contacts_info}','{state}','{revenuename}','{invoice_addr}','{legal_person}','{feedback}') ";
DbHelper.getDbService().update(sqlString, tenParams);
} else {
/* 说明已经存在了 这时候的obj_id 需要存已存在的id。*/
tenParams.put("yid", iscunzai.get("id"));
insertlogyicunzai(tenParams);
String sqlString = "update excustomer_info set customer_id={customer_id},cust_name={cust_name},feedback={feedback},revenueid={revenueid},org_id={org_id},cust_type={cust_type},end_date={end_date},create_date={create_date},org_name={org_name}, "
+ "cust_tax_code={cust_tax_code},contacts_info={contacts_info},state={state},revenuename={revenuename},invoice_addr={invoice_addr},legal_person={legal_person},CUTSTYPE={CUTSTYPE},CUTSREMARK={CUTSREMARK},RUSTYPE={RUSTYPE},DEALTIME={DEALTIME} where id =" + iscunzai.get("id");
DbHelper.getDbService().update(sqlString, tenParams);
}
}
} else {
if (feedbacktype != null && feedbacktype.size() > 0) {

View File

@ -18,7 +18,7 @@ import java.util.*;
*
* 20181127
*/
//@Job("0 15 18 * * ?")
@Job("0 30 09 * * ?")
public class TaskAssignmentJob extends BaseJob{

View File

@ -17,7 +17,7 @@ import java.util.Map.Entry;
*
* 20181126
*/
@Job("0 34 20 * * ?")
@Job("0 16 09 * * ?")
public class TaskAuthJob extends BaseJob{

View File

@ -17,7 +17,7 @@ import java.util.Map.Entry;
*
* 20181126
*/
//@Job("0 29 08 * * ?")
@Job("0 51 08 * * ?")
public class TaskJob extends BaseJob{

View File

@ -12,7 +12,7 @@ import java.util.*;
*
* 20181126
*/
//@Job("0 10 18 * * ?")
//@Job("0 57 08 * * ?")
public class TaskUserJob extends BaseJob{
@Override
public void execute() {
@ -57,14 +57,14 @@ public class TaskUserJob extends BaseJob{
DbHelper.getDbService().commit();
}
List<Map> taskrule= DbHelper.getDbService().queryMapList(" select id, bl"
/*List<Map> taskrule= DbHelper.getDbService().queryMapList(" select id, bl"
+" from rush_task_rule "
+" where to_char(sysdate,'yyyy-mm-dd') between startdate and enddate order by rule_level");
if (taskrule!=null){
for (int i=0;i<taskrule.size();i++) {
updatebfnum(taskrule.get(i).get("id").toString(), Integer.parseInt(taskrule.get(i).get("bl").toString()));
}
}
}*/

View File

@ -13,52 +13,58 @@ import java.util.Map;
* @Author:
* @Date 2021-10-2021/10/8 15:44
*/
//@Job("0 */30 * * * ?")
@Job("0 06 22 * * ?")
//@Job("0 */5 * * * ?")
@Job("0 22 08 * * ?")
public class Updateex extends BaseJob {
@Override
public void execute() {
System.out.println("定时----");
DbHelper.getDbService().update(" update excustomer_info a set khlx=(select isservice from customer_info b where a.customer_id=b.customer_id ),injf=(select tgstatus from customer_info b where a.customer_id=b.customer_id ),\n" +
/* DbHelper.getDbService().update(" update excustomer_info a set khlx=(select isservice from customer_info b where a.customer_id=b.customer_id ),injf=(select tgstatus from customer_info b where a.customer_id=b.customer_id ),\n" +
" ifmz=(select ifmz from customer_info b where a.customer_id=b.customer_id ) where khlx is null and to_char(to_date(create_date, 'yyyy-mm-dd hh24:mi:ss'), 'yyyy-mm-dd')>= TO_CHAR(SYSDATE, 'yyyy-mm-dd') ");
DbHelper.getDbService().update(" update rush_task_center a set isservice=(select isservice from customer_info b where a.customer_id=b.customer_id) , injf=(select tgstatus from customer_info b where a.customer_id=b.customer_id ),\n" +
" ifmz=(select ifmz from customer_info b where a.customer_id=b.customer_id ) ");
DbHelper.getDbService().update(" delete from rush_to_assinged_cus where customer_id in (select b.customer_id " +
" from (select obj_id from rush_log where action = 'rushfee' and " +
" to_char(to_date(operate_date,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd')=to_char(sysdate,'yyyy-mm-dd') ) a " +
" left join rush_record b on a.obj_id = b.id) ");*/
String sql=" select * from excustomer_info a where fistback in ( '联系方式异常', '联系方式为空', '客户不在本单位' ) and state!=1 and cust_type=1";
List<Map> a=DbHelper.getDbService().queryMapList(sql);
for(int i=0;i<a.size();i++){
String dianhua="select t.contact,t.mobile,t.vital,t.is_default,t.addrid,t.source,t.id,DECODE(t.flag, 'add', '添加','0','无','delete','删除','modify','修改') flag, case when t.flag='delete' then '' else t.mobile_mark end as mobile_mark ,operate_date from v_contact t \n" +
" where t.customer_id='"+a.get(i).get("customer_id")+"' and operate_date is not null order by operate_date desc";
List<Map> b=DbHelper.getDbService().queryMapList(dianhua);
if(b.size()==0){
continue;
}
else{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date cj = null;
try {
cj = sdf.parse(a.get(i).get("create_time").toString());
Date zxfk = sdf.parse(b.get(0).get("operate_date").toString());
if (cj.compareTo(zxfk)>=0) {
continue;
}
else{
DbHelper.getDbService().beginTransaction();
DbHelper.getDbService().update("update excustomer_info set state =1 ,dealtime=? ,rustype='信息已更新' where id=?", b.get(0).get("operate_date").toString(),a.get(i).get("id"));
DbHelper.getDbService().commit();
}
} catch (ParseException e) {
continue;
}
String remark="";
String info="";
String sqlfeng="select * from excustomer_info where fistback in ('联系方式为空','联系方式异常','客户不在本单位')\n" +
"and ISCANCEL=0 and TJZQL=0 and to_char(create_time,'yyyy-mm-dd')>='2022-01-01'\n" +
"and to_char(create_time,'yyyy-mm-dd')<='2022-07-13' ";
List<Map> list= DbHelper.getDbService().queryMapList(sqlfeng);
for(int i=0;i<list.size();i++){
//去找一个最近的回访id 需要去找电话
Map cust= DbHelper.getDbService().queryMap("select id from (select id from rush_record where customer_id=? order by create_date desc) where rownum=1 ",list.get(i).get("customer_id"));
if(cust!=null){
String dianhua="select id from (select * from rush_log where obj_id=? order by operate_date desc )where rownum=1";
Map rush= DbHelper.getDbService().queryMap(dianhua,cust.get("id"));
if(rush==null){
continue;
}
String phone="select * from rush_log where obj_id=? and action='phone' ";
List<Map> phons=DbHelper.getDbService().queryMapList(phone,rush.get("id"));
if(phons==null){
continue;
}
for(int q=0;q<phons.size();q++){
remark= phons.get(0).get("remark").toString();
info=phons.get(0).get("info").toString();
}
String sqlupdate="update excustomer_info set extend1=?,extend2=? where id=?";
DbHelper.getDbService().beginTransaction();
DbHelper.getDbService().update(sqlupdate,remark,info,list.get(i).get("id"));
DbHelper.getDbService().commit();
}
}
}
else{
continue;
}
}
}
}

View File

@ -24,6 +24,7 @@ public class updateCustomer extends BaseJob {
" from rush_log where obj_id=? ) where customerid=?",L.get(i).get("id"),L.get(i).get("customerid"));
System.out.println("-----------------"+L.get(i).get("id"));
}
// ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
}

View File

@ -0,0 +1,59 @@
package rush;
import com.aisino.aosplus.core.dao.DbHelper;
import com.aisino.aosplus.plugin.job.BaseJob;
import com.aisino.aosplus.plugin.job.Job;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Job("0 10 03 * * ?")
public class updatecompanyex extends BaseJob {
@Override
public void execute() {
DbHelper.getDbService().update(" update excustomer_info set zxhfremark = null where state=1 and dealtime>zxhftime and fistback in ('联系方式为空','联系方式异常','客户不在本单位') and \n" +
"zxhfremark in ('联系方式为空','联系方式异常','客户不在本单位') ");
DbHelper.getDbService().update(" update excustomer_info set zxhfremark = null WHERE to_char(to_date(zxhftime,'yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd')=to_char(create_time,'yyyy-mm-dd') and (state=0 or state=2) ");
String sql=" select * from excustomer_info a where fistback in ( '联系方式异常', '联系方式为空', '客户不在本单位' ) ";
List<Map> a=DbHelper.getDbService().queryMapList(sql);
for(int i=0;i<a.size();i++){
String dianhua="select t.contact,t.mobile,t.vital,t.is_default,t.addrid,t.source,t.id,DECODE(t.flag, 'add', '添加','0','无','delete','删除','modify','修改') flag, case when t.flag='delete' then '' else t.mobile_mark end as mobile_mark ,operate_date from v_contact t \n" +
" where t.customer_id='"+a.get(i).get("customer_id")+"' and operate_date is not null order by operate_date desc";
List<Map> b=DbHelper.getDbService().queryMapList(dianhua);
if(b.size()==0){
continue;
}
else{
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date cj = null;
try {
cj = sdf.parse(a.get(i).get("create_time").toString());
Date zxfk = sdf.parse(b.get(0).get("operate_date").toString());
if (cj.compareTo(zxfk)>=0) {
continue;
}
else{
DbHelper.getDbService().beginTransaction();
DbHelper.getDbService().update("update excustomer_info set state =1 ,dealtime=? ,rustype='信息已更新' where id=?", b.get(0).get("operate_date").toString(),a.get(i).get("id"));
DbHelper.getDbService().commit();
}
} catch (ParseException e) {
continue;
}
}
}
//更新分公司异常表中tjzql 字段为1 条件为 将免征户服务费部分更新为1
}
}